[jboss-user] [JBoss Web Services] - Failed to define class com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl

Paul Robinson do-not-reply at jboss.com
Tue Nov 1 07:23:35 EDT 2011


Paul Robinson [http://community.jboss.org/people/paul.robinson] created the discussion

"Failed to define class com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl"

To view the discussion, visit: http://community.jboss.org/message/634414#634414

--------------------------------------------------------------
Hello,

I've started to see this error appearing in AS 7 master. It does not occur in a version I built from master on the 21st October, but it does occur in a version I built from master on the 31st October. 

I have a simple jax-ws Web service with a handler chain. The problem only occurs when the handler chain it enabled. When invoking the service I see the following stacktrace:

{code}
11:02:29,643 INFO  [stdout] (http-localhost-127.0.0.1-8080-1) MyHandler.getHeaders()
11:02:29,672 WARN  [org.jboss.modules] (http-localhost-127.0.0.1-8080-1) Failed to define class com.sun.xml.messaging.saaj.soap.SOAPDocumentImpl in Module "com.sun.xml.messaging.saaj:main" from local module loader @5f989f84 (roots: /home/paul/dev/jboss-as.2/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules): java.lang.LinkageError: Failed to link com/sun/xml/messaging/saaj/soap/SOAPDocumentImpl (Module "com.sun.xml.messaging.saaj:main" from local module loader @5f989f84 (roots: /home/paul/dev/jboss-as.2/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules))
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:416)
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260)
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
    at org.jboss.modules.Module.loadModuleClass(Module.java:500)
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:119)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.<init>(SOAPPart1_1Impl.java:89)
    at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:109)
    at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:185)
    at org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:78)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.getOpQName(SOAPHandlerInterceptor.java:320)
    at org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(AbstractJAXWSHandlerInterceptor.java:111)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:255)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:160)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:123)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:70)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206)
    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
    at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:174)
    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
    at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.0.Beta12.jar:2.0.0.Beta12]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:155) [jboss-as-web-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:670) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]
Caused by: java.lang.NoClassDefFoundError: com/sun/org/apache/xerces/internal/dom/DocumentImpl
    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_22]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634) [:1.6.0_22]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [:1.6.0_22]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:330)
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:411)
    ... 44 more
Caused by: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DocumentImpl from [Module "com.sun.xml.messaging.saaj:main" from local module loader @5f989f84 (roots: /home/paul/dev/jboss-as.2/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules)]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
    ... 49 more

11:02:29,677 ERROR [org.apache.catalina.core.ContainerBase.[jboss.web].[default-host].[/echo_service].[EchoService]] (http-localhost-127.0.0.1-8080-1) Servlet.service() for servlet EchoService threw exception: java.lang.ClassNotFoundException: com.sun.org.apache.xerces.internal.dom.DocumentImpl from [Module "com.sun.xml.messaging.saaj:main" from local module loader @5f989f84 (roots: /home/paul/dev/jboss-as.2/build/target/jboss-as-7.1.0.Alpha2-SNAPSHOT/modules)]
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:190)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
    at java.lang.ClassLoader.defineClass1(Native Method) [:1.6.0_22]
    at java.lang.ClassLoader.defineClass(ClassLoader.java:634) [:1.6.0_22]
    at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:142) [:1.6.0_22]
    at org.jboss.modules.ModuleClassLoader.doDefineOrLoadClass(ModuleClassLoader.java:330)
    at org.jboss.modules.ModuleClassLoader.defineClass(ModuleClassLoader.java:411)
    at org.jboss.modules.ModuleClassLoader.loadClassLocal(ModuleClassLoader.java:260)
    at org.jboss.modules.ModuleClassLoader$1.loadClassLocal(ModuleClassLoader.java:73)
    at org.jboss.modules.Module.loadModuleClass(Module.java:500)
    at org.jboss.modules.ModuleClassLoader.findClass(ModuleClassLoader.java:182)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:485)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClassChecked(ConcurrentClassLoader.java:444)
    at org.jboss.modules.ConcurrentClassLoader.performLoadClass(ConcurrentClassLoader.java:421)
    at org.jboss.modules.ConcurrentClassLoader.loadClass(ConcurrentClassLoader.java:143)
    at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:119)
    at com.sun.xml.messaging.saaj.soap.ver1_1.SOAPPart1_1Impl.<init>(SOAPPart1_1Impl.java:89)
    at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:109)
    at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:185)
    at org.apache.cxf.jaxws.handler.soap.SOAPMessageContextImpl.getMessage(SOAPMessageContextImpl.java:78)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.getOpQName(SOAPHandlerInterceptor.java:320)
    at org.apache.cxf.jaxws.handler.AbstractJAXWSHandlerInterceptor.setupBindingOperationInfo(AbstractJAXWSHandlerInterceptor.java:111)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.createProtocolMessageContext(SOAPHandlerInterceptor.java:255)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessageInternal(SOAPHandlerInterceptor.java:160)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:123)
    at org.apache.cxf.jaxws.handler.soap.SOAPHandlerInterceptor.handleMessage(SOAPHandlerInterceptor.java:70)
    at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:263)
    at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:121)
    at org.apache.cxf.transport.http.AbstractHTTPDestination.invoke(AbstractHTTPDestination.java:206)
    at org.jboss.wsf.stack.cxf.RequestHandlerImpl.handleHttpRequest(RequestHandlerImpl.java:91)
    at org.jboss.wsf.stack.cxf.transport.ServletHelper.callRequestHandler(ServletHelper.java:174)
    at org.jboss.wsf.stack.cxf.CXFServletExt.invoke(CXFServletExt.java:87)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.handleRequest(AbstractHTTPServlet.java:184)
    at org.apache.cxf.transport.servlet.AbstractHTTPServlet.doPost(AbstractHTTPServlet.java:107)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    at org.jboss.wsf.stack.cxf.CXFServletExt.service(CXFServletExt.java:135)
    at org.jboss.wsf.spi.deployment.WSFServlet.service(WSFServlet.java:140) [jbossws-spi-2.0.0.Beta12.jar:2.0.0.Beta12]
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.0.Final.jar:1.0.0.Final]
    at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:329) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:248) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:275) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:161) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:155) [jboss-as-web-7.1.0.Alpha2-SNAPSHOT.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:155) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:362) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:877) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:670) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:952) [jbossweb-7.0.2.Final.jar:7.1.0.Alpha2-SNAPSHOT]
    at java.lang.Thread.run(Thread.java:679) [:1.6.0_22]

 {code}

I have done a search for "com.sun.org.apache.xerces.internal.dom.DocumentImpl" and it does not appear in any of the jars of either of the two AS7 builds mentioned above. However, it does appear in rt.jar of the JRE (oracle jdk1.6.0_27). 

I have tried this with these java versions and get the same problem: 

{code}
java version "1.6.0_22"
OpenJDK Runtime Environment (IcedTea6 1.10.4) (fedora-60.1.10.4.fc15-x86_64)
OpenJDK 64-Bit Server VM (build 20.0-b11, mixed mode)

java version "1.6.0_27"
Java(TM) SE Runtime Environment (build 1.6.0_27-b07)
Java HotSpot(TM) 64-Bit Server VM (build 20.2-b06, mixed mode)
{code}


I've attached a simple example that re-produces this issue. Do the following to try it:

1. Get an up-to-date checkout of AS7, build and start the AS
2. unzip my example
3. mvn install
4. cp target/echo_service.war $JBOSS_HOME/standalone/deployments
5. wait to deploy
6. mvn test
7. observe test failure and the above stacktrace on the server.

I'm assuming something has changed in the past 10 days, to cause this. Does anyone know what it may be?


Thanks a lot,

Paul
--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/634414#634414]

Start a new discussion in JBoss Web Services at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2044]

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20111101/f50c577e/attachment-0001.html 


More information about the jboss-user mailing list