Tomcat:无法解析运行时描述符

时间:2012-11-26 19:39:29

标签: java apache tomcat jax-ws

我尝试在CentOS 6.3下部署JAX-WS Web服务 - > Apache - > Tomcat 5.5

我读谷歌搜索了几个小时,问了我所有的朋友,并试图在stackoverflow上找到解决方案但无济于事。有人能帮助我吗?提前谢谢。

我收到以下错误消息:

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

1 个答案:

答案 0 :(得分:3)

看一下文档:

http://docs.oracle.com/javase/1.4.2/docs/api/java/lang/IllegalAccessError.html 如果应用程序尝试访问或修改字段,或调用其无权访问的方法,则抛出该异常。 通常,编译器会捕获此错误;如果类的定义发生不兼容的更改,则此错误只能在运行时发生。

换句话说,MetroClientTubelineAssemblyContextImpl被编译为超类DefaultClientTubelineAssemblyContext的一个版本的子类,但它似乎在运行时已经改变。

可能发生的事情是,classpath中有两个jar,其中有两个类DefaultClientTubelineAssemblyContext或MetroClientTubelineAssemblyContextImpl。你应该找一下这些类的jar,并尝试只加载一个。

在你的应用程序web存档的WEB-INF / lib和$ TOMCAT_HOME / lib文件夹中的jar中查找jar,检查是否有任何重复项。