3 Replies Latest reply on Nov 3, 2003 7:58 AM by Jon Barnett

    Problem deploying web services war

    adamensor Newbie

      posted October 31, 2003 02:55 AM
      --------------------------------------------------------------------------------
      Hi, I generated a web services war file with the Sun web services pack 1.2. It works fine with the embedded tomcat that comes with pack.
      I then tried to deploy with Jboss 3_2_1 and tomcat 4.1.24 on Windows. I get this error saying a class cannot be loaded even though the class is in the jar and the jar is in server\default\lib

      09:28:57,589 ERROR [Engine] StandardContext[/sds-jaxrpc]: Exception sending cont
      ext initialized event to listener instance of class com.sun.xml.rpc.server.http.
      JAXRPCContextListener
      java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/SOAPVersionMisma
      tchException
      at java.lang.Class.forName0(Native Method)
      at java.lang.Class.forName(Class.java:217)
      at com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.loadClass(JAXRPCR
      untimeInfoParser.java:150)
      at com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.parseEndpoints(JA
      XRPCRuntimeInfoParser.java:59)
      at com.sun.xml.rpc.server.http.JAXRPCRuntimeInfoParser.parse(JAXRPCRunti
      meInfoParser.java:31)
      at com.sun.xml.rpc.server.http.JAXRPCContextListener.contextInitialized(
      JAXRPCContextListener.java:59)
      at org.apache.catalina.core.StandardContext.listenerStart(StandardContex
      t.java:3269)
      at org.apache.catalina.core.StandardContext.start(StandardContext.java:3
      598)
      at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase
      .java:821)
      at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:80
      7)
      at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:579)

      Any ideas?

      Many thanks
      Adam

        • 1. Re: Problem deploying web services war
          Jon Barnett Master

          Try moving the SOAP layer libraries from your WEB-INF/lib of your application to the run-time instance lib directory - probably JBOSS_HOME/server/default/lib. i.e. Libraries like jaxp-api.jar. The classloading may be impacting the application.

          • 2. Re: Problem deploying web services war
            adamensor Newbie

            Hi, thanks for coming back, all the jars are in default\lib, just the xml descriptors in WEB-INF. Any other ideas?

            From what I've seen there seems to be a number of people who have had issues deploying web services developed with Sun JDWSP on app servers other than Sun ONE!?

            • 3. Re: Problem deploying web services war
              Jon Barnett Master

              Not really since I haven't played with their implementation too much. Since I'm more of an Axis person due to IBM influence, and this is touted as the successor to SOAP 1.0 (hyped as SOAP 2.0), I guess the Sun path is the less popular path. We know that Axis works on Tomcat (it is an Apache XML project) and plenty of work has been done by the Apache guys and IBM (it has also been incorporated in IBM WebSphere).

              I'm guessing there is something in the Sun libraries that is causing some class loading issues, but may take some time to figure out. You'd have to experiment with putting the classes in different areas. A quick trial might be to put the JARs back in the WAR and turn off Java2ClassLoadingCompliance in your META-INF/jboss-service.xml for your servlet container, or in your jboss-web.xml for your WAR. If you are using Tomcat, the servlet container will probably be deployed as jbossweb-tomcat41.sar. Turning off the Java 2 Classloading compliance should force the container to check libraries within the WAR first before checking up the classloader hierarchy, instead of travelling down the hierarchy.

              Otherwise you could try the loader repository as well although this applies to an EAR deployment. There are several posts in the forums that give details on this, from memory.