2 Replies Latest reply on Aug 23, 2007 8:26 AM by Thomas Diesler

    Jboww WS problem - plz help

    james nick Newbie

      I have the following configuration:
      - JDK 1.5.0_12
      - jboss-4.2.1.GA
      - jbossws-native-2.0.1.GA

      I followed the user guide: http://jbws.dyndns.org/mediawiki/index.php/JAX-WS_User_Guide#Tools

      I've successfully deployed the Echo web service. Howserver, when I run the ws client (consumer) I got this exception:

      Exception in thread "main" javax.xml.ws.WebServiceException: Unable to load Prov
      ider: Failed to load javax.xml.ws.spi.Provider: org.jboss.ws.core.jaxws.spi.Prov
       at javax.xml.ws.spi.Provider.provider(Provider.java:98)
       at javax.xml.ws.Service.<init>(Service.java:83)
       at com.company.package.EchoService.<init>(EchoService.java:40)
       at EchoClient.main(EchoClient.java:10)
      Caused by: java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Prov
      ider: org.jboss.ws.core.jaxws.spi.ProviderImpl
       at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
       at javax.xml.ws.spi.Provider.provider(Provider.java:90)
       ... 3 more
      Caused by: java.lang.NoClassDefFoundError: org/jboss/util/NotImplementedExceptio
       at java.lang.Class.getDeclaredConstructors0(Native Method)
       at java.lang.Class.privateGetDeclaredConstructors(Class.java:2357)
       at java.lang.Class.getConstructor0(Class.java:2671)
       at java.lang.Class.newInstance0(Class.java:321)
       at java.lang.Class.newInstance(Class.java:303)
       at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
       ... 4 more

      Any idea about this problem?
      any help will be much appreciated

      thanks in advance,

        • 1. Re: Jboww WS problem - plz help
          james nick Newbie

          got it...

          I've added set


          to the wsrunclient.bat and it works now !

          => Jboss WS team: think about this plz

          • 2. Re: Jboww WS problem - plz help
            Thomas Diesler Master


            Does this also work?

            @echo off
            rem $Id: wsprovide.bat 2325 2007-02-09 22:14:15Z jason.greene@jboss.com $
            @if not "%ECHO%" == "" echo %ECHO%
            @if "%OS%" == "Windows_NT" setlocal
            set DIRNAME=.\
            if "%OS%" == "Windows_NT" set DIRNAME=%~dp0%
            set PROGNAME=run.bat
            if "%OS%" == "Windows_NT" set PROGNAME=%~nx0%
            if not [%1] == [] goto start
             echo %PROGNAME% is a command line tool that invokes a JBossWS JAX-WS Web Service client.
             echo It builds the correct classpath and endorsed libs for you. Feel free to use
             echo the code for this script to make your own shell scripts. It is open source
             echo after all.
             echo usage: %PROGNAME% [-classpath ^<additional class path^>] ^<java-main-class^> [arguments...]
             goto EOF
            set ARGS=
            if [%1] == [] goto endloop
             if not %1 == -classpath goto argset
             set WSRUNCLIENT_CLASSPATH=%2
             goto loop
             set ARGS=%ARGS% %1
             goto loop
            set JAVA=%JAVA_HOME%\bin\java
            set JBOSS_HOME=%DIRNAME%\..
            rem Setup the java endorsed dirs
            # Setup the java endorsed dirs
            set JBOSS_ENDORSED_DIRS=%JBOSS_HOME%\lib\endorsed
            # Setup the client classpath
            set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME%/client/jbossws-client.jar
            # JBossAS-5.0 subset of jbossall-client.jar
            set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME/client/jboss-logging-spi.jar
            set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME/client/jboss-common-core.jar
            # JBossAS-4.2 subset of jbossall-client.jar
            set WSRUNCLIENT_CLASSPATH=%WSRUNCLIENT_CLASSPATH%;%JBOSS_HOME/client/jboss-common-client.jar
            rem Execute the JVM
            "%JAVA%" %JAVA_OPTS% -Djava.endorsed.dirs="%JBOSS_ENDORSED_DIRS%" -Dlog4j.configuration=wstools-log4j.xml -classpath "%WSRUNCLIENT_CLASSPATH%" %ARGS%