I tried to deploy a JAX-WS webservice under CentOS 6.3 -> Apache -> Tomcat 5.5
I read searched with google for hours, asked all of my friends and also tried to find a solution on stackoverflow but to no avail. Can somebody help me? Thank you in advance.
I receive the following error message:
Nov 26, 2012 12:36:52 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener parseAdaptersAndCreateDelegate SEVERE: WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at com.sun.xml.ws.assembler.MetroTubelineAssemblerFactoryImpl.doCreate(MetroTubelineAssemblerFactoryImpl.java:63) at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:109) at com.sun.xml.ws.server.WSEndpointImpl.(WSEndpointImpl.java:170) at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:306) at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:301) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:147) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:574) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:557) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:260) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:152) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:884) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:737) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) at java.lang.Thread.run(Thread.java:662) Nov 26, 2012 12:36:52 PM org.apache.catalina.core.StandardContext listenerStart SEVERE: Exception sending context initialized event to listener instance of class com.sun.xml.ws.transport.http.servlet.WSServletContextListener com.sun.xml.ws.transport.http.servlet.WSServletException: WSSERVLET11: failed to parse runtime descriptor: java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:141) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.contextInitialized(WSServletContextListener.java:152) at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:3795) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4252) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:760) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:740) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:544) at org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:884) at org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:737) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:498) at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1271) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:301) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:120) at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1306) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1570) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1579) at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1559) at java.lang.Thread.run(Thread.java:662) Caused by: java.lang.IllegalAccessError: class com.sun.xml.ws.assembler.MetroClientTubelineAssemblyContextImpl cannot access its superclass com.sun.xml.ws.assembler.DefaultClientTubelineAssemblyContext at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at com.sun.xml.ws.assembler.MetroTubelineAssemblerFactoryImpl.doCreate(MetroTubelineAssemblerFactoryImpl.java:63) at com.sun.xml.ws.api.pipe.TubelineAssemblerFactory.create(TubelineAssemblerFactory.java:109) at com.sun.xml.ws.server.WSEndpointImpl.(WSEndpointImpl.java:170) at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:306) at com.sun.xml.ws.server.EndpointFactory.create(EndpointFactory.java:301) at com.sun.xml.ws.server.EndpointFactory.createEndpoint(EndpointFactory.java:147) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:574) at com.sun.xml.ws.api.server.WSEndpoint.create(WSEndpoint.java:557) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parseAdapters(DeploymentDescriptorParser.java:260) at com.sun.xml.ws.transport.http.DeploymentDescriptorParser.parse(DeploymentDescriptorParser.java:152) at com.sun.xml.ws.transport.http.servlet.WSServletContextListener.parseAdaptersAndCreateDelegate(WSServletContextListener.java:131) ... 17 more Nov 26, 2012 12:36:52 PM org.apache.catalina.core.StandardContext start SEVERE: Error listenerStart Nov 26, 2012 12:36:52 PM org.apache.catalina.core.StandardContext start SEVERE: Context [/lws] startup failed due to previous errors Nov 26, 2012 12:36:52 PM com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextDestroyed INFO: WSSERVLET13: JAX-WS context listener destroyed
Take a look at the documentation:
http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/IllegalAccessError.html Thrown if an application attempts to access or modify a field, or to call a method that it does not have access to. Normally, this error is caught by the compiler; this error can only occur at run time if the definition of a class has incompatibly changed.
In other words, MetroClientTubelineAssemblyContextImpl was compiled to be subclass of a version of super class DefaultClientTubelineAssemblyContext, but it seems that has changed in runtime.
What is probably happening to you is there are two jars in classpath with one of these two classes DefaultClientTubelineAssemblyContext or MetroClientTubelineAssemblyContextImpl. You should look for what jars have these classes and try to let only one loaded.
Seek the jars inside WEB-INF/lib of your application web archive and the jars inside $TOMCAT_HOME/lib folder to check if you find any duplicates.