3 Replies Latest reply on Dec 1, 2010 8:57 AM by asoldano

    Deploying JBOSS CXF-WS with JBOSS AS 4.2.3G.A. on jdk 1.6

    sawan1424


      Hi ,
      I am using JBOSS AS 4.2.3 with JBOSS WS-CXF 3.0.2 version with JDK 1.6 on Eclipse 3.5 Galileo.
      I successfully installed CXF WS on JBOSS AS 4.2.3.G.
      In the Eclipse->Window->preference->Web Service -> JBOSS WS

      In that option , I selected JBOSS 4.2.3 as JBOSS 4.2.3 G.A. as JBOSS WS Runtime as I selected it as jboss.home in the ant.properties file.


      After that I created Dynamic Web Project with JBOSS WS run time .

      I created a POJO .

      package com.test.ws;

      import javax.jws.WebMethod;
      import javax.jws.WebService;
      @WebService
      public class Converter {

      @WebMethod
      public float celsiusToFarenheit ( float celsius )
      {
      return (celsius * 9 / 5) + 32;
      }
      @WebMethod
      public float farenheitToCelsius ( float farenheit )
      {
      return (farenheit - 32) * 5 / 9;
      }

      }


      After that I tried to create a Web Service using Bottom up approach similar to Axis procedure.But When I click next button ,it showed me an exception.

      Details of EXception :-

      Exception in thread "main" java.lang.IllegalStateException: Failed to load: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
      at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:205)
      at org.jboss.wsf.spi.util.ServiceLoader.loadFromSystemProperty(ServiceLoader.java:138)
      at org.jboss.wsf.spi.util.ServiceLoader.loadService(ServiceLoader.java:68)
      at org.jboss.wsf.spi.tools.WSContractProvider.newInstance(WSContractProvider.java:65)
      at org.jboss.wsf.spi.tools.cmd.WSProvide.generate(WSProvide.java:170)
      at org.jboss.wsf.spi.tools.cmd.WSProvide.main(WSProvide.java:77)
      Caused by: java.lang.ClassNotFoundException: org.jboss.ws.tools.jaxws.impl.JBossWSProviderFactoryImpl
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at org.jboss.wsf.spi.util.ServiceLoader.loadDefault(ServiceLoader.java:200)
      ... 5 more


      Please help me out.

      Please tell me where I made a mistake.

      Any help would be appreciated.

      Thanks
      Sandy

        • 1. Re: Deploying JBOSS CXF-WS with JBOSS AS 4.2.3G.A. on jdk 1.
          ropalka

          Hi,

          your IDE is not properly configured. You need to endorse JBossWS jaxws.
          IOW you need to specify -Djava.endorsed.dirs= that points to directory where are JBossWS JAXWS libs. In most cases it's JBOSS_HOME/lib/endorsed

          Richard

          • 2. Re: Deploying JBOSS CXF-WS with JBOSS AS 4.2.3G.A. on jdk 1.6
            izgur

            How to specify -Djava.endorsed.dirs= in eclipse ?

            On the project, run configuration, parameters ?

            Shouldn't it work if i add all jars from /lib/endorsed/ to the build path ?

             

            Thanks in advance!

            • 3. Re: Deploying JBOSS CXF-WS with JBOSS AS 4.2.3G.A. on jdk 1.6
              asoldano
              Shouldn't it work if i add all jars from /lib/endorsed/ to the build path ?

              Not necessarily. Depends on the jdk version being used and the jaxws/jaxb api you need/want to use. Basically, for instance whenever you want/need to use a jaxws api different from the one included in JDK (if any, jaxws 2.1 is included in JDK 1.6 u4 or greater), you need to have that in the bootstrap classloader, in order to override the default one. And that can be done properly tuning the java.endorsed.dirs configuration.