Geronimo
  1. Geronimo
  2. GERONIMO-3792

Requesting result from a @WebService fails with NoClassDefFoundError using CXF

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Won't Fix
    • Affects Version/s: 2.0.2
    • Fix Version/s: 2.0.3, 2.1
    • Component/s: webservices
    • Security Level: public (Regular issues)
    • Labels:
      None
    • Environment:

      Windows XP x86-32, IBM J9 1.5.0 SR5, Geronimo w/ Tomcat+OpenEJB+CXF

      Description

      I'm attempting to create a very simple "Hello World" web service using CXF as the JAX-WS provider. Whenever I make a call to the web service, I get the following error in the server log:

      20:01:15,906 ERROR [CoyoteAdapter] An exception or error occurred in the container during the request processing
      java.lang.NoClassDefFoundError: com.sun.org.apache.xerces.internal.dom.DocumentImpl
      at java.lang.ClassLoader.defineClassImpl(Native Method)
      at java.lang.ClassLoader.defineClass(ClassLoader.java:228)
      at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:148)
      at org.apache.geronimo.kernel.classloader.JarFileClassLoader.access$200(JarFileClassLoader.java:52)
      at org.apache.geronimo.kernel.classloader.JarFileClassLoader$6.run(JarFileClassLoader.java:308)
      at java.security.AccessController.doPrivileged(AccessController.java:275)
      at org.apache.geronimo.kernel.classloader.JarFileClassLoader.findClass(JarFileClassLoader.java:260)
      at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadOptimizedClass(MultiParentClassLoader.java:422)
      at org.apache.geronimo.kernel.config.MultiParentClassLoader.loadClass(MultiParentClassLoader.java:278)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:573)
      at com.sun.xml.messaging.saaj.soap.SOAPPartImpl.<init>(SOAPPartImpl.java:88)
      at com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl.getSOAPPart(Message1_1Impl.java:78)
      at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:85)
      at org.apache.cxf.binding.soap.saaj.SAAJInInterceptor.handleMessage(SAAJInInterceptor.java:63)
      at org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:207)
      at org.apache.cxf.transport.ChainInitiationObserver.onMessage(ChainInitiationObserver.java:73)
      at org.apache.geronimo.cxf.GeronimoDestination.invoke(GeronimoDestination.java:115)
      at org.apache.geronimo.cxf.CXFWebServiceContainer.processPOST(CXFWebServiceContainer.java:107)
      at org.apache.geronimo.cxf.CXFWebServiceContainer.invoke(CXFWebServiceContainer.java:83)
      at org.apache.geronimo.tomcat.TomcatEJBWebServiceContext$EJBWebServiceValve.invoke(TomcatEJBWebServiceContext.java:180)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
      at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:563)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:263)
      at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
      at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:584)
      at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
      at java.lang.Thread.run(Thread.java:801)

      I will attach both the EAR and geronimo.log. I've tested against both the latest 2.0.3-SNAPSHOT and the TCK-certified build for jee5-2.0-M6-rc1. Also, I don't seem to encounter this problem when using Axis2 as the JAX-WS provider.

      1. geronimo.log
        15 kB
        Cedric Hurst
      2. HelloWorldServiceEAR.ear
        2 kB
        Cedric Hurst

        Activity

        Hide
        Cedric Hurst added a comment -

        The EAR I'm deploying.

        Show
        Cedric Hurst added a comment - The EAR I'm deploying.
        Hide
        Cedric Hurst added a comment -

        Log file.

        Show
        Cedric Hurst added a comment - Log file.
        Hide
        Daniel Kulp added a comment -

        This problem is specific to running on the IBM JDK. Three fixes:

        1) Switch to a Sun JDK

        2) Add suns parser jar to the classpath. Download:
        https://maven-repository.dev.java.net/nonav/repository/com.sun.xml.parsers/jars/jaxp-ri-1.4.2.jar

        3) Switch to a different SAAJ implementation that will work on the IBM JDK. The Axiom SAAJ impl may work, but CXF hasn't been tested with it.

        Show
        Daniel Kulp added a comment - This problem is specific to running on the IBM JDK. Three fixes: 1) Switch to a Sun JDK 2) Add suns parser jar to the classpath. Download: https://maven-repository.dev.java.net/nonav/repository/com.sun.xml.parsers/jars/jaxp-ri-1.4.2.jar 3) Switch to a different SAAJ implementation that will work on the IBM JDK. The Axiom SAAJ impl may work, but CXF hasn't been tested with it.
        Hide
        Cedric Hurst added a comment -

        Thanks for the suggestion, Daniel. Running on the Sun JDK seemed to fix this problem. I'd imagine that other non-Sun JDKs, such as Apple or Blackdown, would have similar issues. Perhaps Sun's xml parser should be added to the common libs?

        Show
        Cedric Hurst added a comment - Thanks for the suggestion, Daniel. Running on the Sun JDK seemed to fix this problem. I'd imagine that other non-Sun JDKs, such as Apple or Blackdown, would have similar issues. Perhaps Sun's xml parser should be added to the common libs?
        Hide
        Jarek Gawor added a comment -

        This is a known issue with Sun's SAAJ implementation.

        Thanks to Daniel for listing the work-arounds. I also updated Geronimo documentation with this information: http://cwiki.apache.org/confluence/display/GMOxDOC20/Configure+JAX-WS+engine

        Show
        Jarek Gawor added a comment - This is a known issue with Sun's SAAJ implementation. Thanks to Daniel for listing the work-arounds. I also updated Geronimo documentation with this information: http://cwiki.apache.org/confluence/display/GMOxDOC20/Configure+JAX-WS+engine

          People

          • Assignee:
            Jarek Gawor
            Reporter:
            Cedric Hurst
          • Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development