1 Reply Latest reply on Oct 23, 2008 12:28 PM by peterj

    ERROR without exception: JAX-WS context listener initializin

    qpool.char

      Hello dear forum,

      i follow the detailed descriptions to make a simple WebService with JDK 6 and JBoss 4.2.3 from this website: http://blog.vinodsingh.com/2008/09/jax-ws-web-service-and-jboss.html?showComment=1224766980000#c2556965947904510784

      When i deploy the .war to JBoss, i get the following Errors:
      17:07:14,312 INFO [TomcatDeployer] deploy, ctxPath=/HelloWorld, warUrl=.../tmp/deploy/tmp7738HelloWorld-exp.war/
      17:07:14,781 ERROR [STDERR] 23.10.2008 17:07:14 com.sun.xml.ws.transport.http.servlet.WSServletContextListener contextInitialized
      INFO: WSSERVLET12: JAX-WS context listener initializing
      17:07:16,109 ERROR [STDERR] 23.10.2008 17:07:16 com.sun.xml.ws.transport.http.servlet.WSServletDelegate <init>
      INFO: WSSERVLET14: JAX-WS servlet initializing
      17:07:17,000 INFO [WSDLFilePublisher] WSDL published to: file:/C:/JavaStuff/jboss-4.2.3.GA/server/default/data/wsdl/HelloWorld.war/HelloWorldService7739.wsdl


      Generating some client stubs worked, but trying to invoke a client, i get the following exception:
      17:14:38,093 ERROR [[HelloWorldWebService]] Servlet.service() for servlet HelloWorldWebService threw exception
      java.lang.ClassCastException: com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl cannot be cast to org.jboss.ws.core.soap.SOAPMessageImpl
       at org.jboss.ws.core.jaxws.SOAPFaultHelperJAXWS.toSOAPMessage(SOAPFaultHelperJAXWS.java:245)


      I have also tried JBoss 5.0 and the JBossWS-patches to jbossws 3.0.4.

      I believe that there are some class-loading problems with Java 6, and filled the ${JBOSS_HOME}/lib/endorsed directory with jars mentioned on this page: http://thesmallpotato.blogspot.com/2007/06/jdk-16-jboss-420-ejb3-web-service-axis2.html ,but it did not help. I then added jboss-jaxws.jar and jboss-jaxws-ext.jar, but without success again...

      So i thought maybe the error comes from my web.xml, which i have a question for:
      <servlet>
       <servlet-name>HelloWorldWebService</servlet-name>
       <servlet-class>com.sun.xml.ws.transport.http.servlet.WSServlet</servlet-class>
       <!-- servlet-class>biz.accelsis.helloworld.HelloWorldWS</servlet-class> -->
      </servlet>
      

      Can you tell me which value to put into the <servlet-class> tag?

      Thx in advance for all the help, i am really stucked here.



        • 1. Re: ERROR without exception: JAX-WS context listener initial
          peterj

          There are two different 4.2.3 downloads, one for JDK 5 the other for JDK 6. Did you get the one for JDK 6? If so, then you do not need to mess around with endorsed directories because it is already done.

          For the web.xml, is com.sun.xml.ws.transport.http.servlet.WSServlet your class that provides the web service? Or is it biz.accelsis.helloworld.HelloWorldWS? The servlet-class should be the class that implements the web service.