6 Replies Latest reply on Mar 17, 2009 5:04 AM by maeste

    SOAP Client / WISE invocation error

      I am trying to consume an external webservice in my jboss-esb.xml using the Wise SOAPClient

      I receive the following error during execution

      18:44:41,871 INFO [STDOUT] [ERROR] com.sun.tools.javac.Main is not available in the classpath, requires Suns JDK version 5.0 or latter.
      18:44:41,876 INFO [STDOUT] unknown location
      18:44:41,876 INFO [STDOUT] compilation failed, errors should have been reported
      18:44:41,877 INFO [STDOUT] Failed to invoke WsImport
      18:44:41,877 INFO [STDOUT] java.lang.IllegalStateException: WsImport invocation failed. Try the verbose switch for more information

      What can I do to fix this issue? I have jdk 1.5 and when I try to import the wsdl using wsimport from command i don't receive any errors?


      Following is the log from my error console

      18:43:55,876 INFO [Server] JBoss (MX MicroKernel) [4.2.3.GA (build: SVNTag=JBoss_4_2_3_GA date=200807181439)] Started in 34s:70ms
      18:44:40,813 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
      18:44:40,814 INFO [STDOUT] Request map is: {toWhom=Jimbo}
      18:44:40,814 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
      18:44:41,071 INFO [STDOUT] parsing WSDL...
      18:44:41,835 INFO [STDOUT] generating code...
      18:44:41,855 INFO [STDOUT] it/javalinux/wise/HelloWorld.java
      18:44:41,860 INFO [STDOUT] it/javalinux/wise/HelloWorldWSService.java
      18:44:41,862 INFO [STDOUT] it/javalinux/wise/ObjectFactory.java
      18:44:41,864 INFO [STDOUT] it/javalinux/wise/SayHello.java
      18:44:41,865 INFO [STDOUT] it/javalinux/wise/SayHelloResponse.java
      18:44:41,866 INFO [STDOUT] it/javalinux/wise/package-info.java
      18:44:41,871 INFO [STDOUT] [ERROR] com.sun.tools.javac.Main is not available in the classpath, requires Suns JDK version 5.0 or latter.
      18:44:41,876 INFO [STDOUT] unknown location
      18:44:41,876 INFO [STDOUT] compilation failed, errors should have been reported
      18:44:41,877 INFO [STDOUT] Failed to invoke WsImport
      18:44:41,877 INFO [STDOUT] java.lang.IllegalStateException: WsImport invocation failed. Try the verbose switch for more information
      18:44:41,877 INFO [STDOUT] at org.jboss.ws.tools.jaxws.impl.SunRIConsumerImpl.consume(SunRIConsumerImpl.java:220)
      18:44:41,877 INFO [STDOUT] at org.jboss.wsf.spi.tools.WSContractConsumer.consume(WSContractConsumer.java:196)
      18:44:41,877 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClient.importObjectFromWsdl(WSDynamicClient.java:165)
      18:44:41,877 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:125)
      18:44:41,877 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:94)
      18:44:41,877 INFO [STDOUT] at it.javalinux.wise.core.client.WSDynamicClientFactory.getClient(WSDynamicClientFactory.java:120)
      18:44:41,878 INFO [STDOUT] at org.jboss.soa.esb.actions.soap.wise.SOAPClient.process(SOAPClient.java:225)
      18:44:41,878 INFO [STDOUT] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
      18:44:41,878 INFO [STDOUT] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
      18:44:41,878 INFO [STDOUT] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      18:44:41,878 INFO [STDOUT] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      18:44:41,878 INFO [STDOUT] at java.lang.Thread.run(Thread.java:619)
      18:44:41,879 ERROR [STDERR] it.javalinux.wise.core.exceptions.WiseRuntimeException: Error occurred while consuming wsdl: /tmp/Wise0.xml
      18:44:41,879 ERROR [STDERR] at it.javalinux.wise.core.exceptions.WiseRuntimeException.rethrow(WiseRuntimeException.java:44)
      18:44:41,880 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:151)
      18:44:41,880 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:94)
      18:44:41,880 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClientFactory.getClient(WSDynamicClientFactory.java:120)
      18:44:41,880 ERROR [STDERR] at org.jboss.soa.esb.actions.soap.wise.SOAPClient.process(SOAPClient.java:225)
      18:44:41,880 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
      18:44:41,880 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
      18:44:41,880 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
      18:44:41,880 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
      18:44:41,880 ERROR [STDERR] at java.lang.Thread.run(Thread.java:619)
      18:44:41,881 ERROR [STDERR] Caused by: java.lang.NullPointerException
      18:44:41,881 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.getClassNames(WSDynamicClient.java:181)
      18:44:41,881 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:127)
      18:44:41,881 ERROR [STDERR] ... 8 more

        • 1. Re: SOAP Client / WISE invocation error
          beve

          Can you double check your servers console output upon startup and verify the java version actually being used by the server. Look for:

          =========================================================================
          
           JBoss Bootstrap Environment
          
           JBOSS_HOME: /opt/jboss/esb/trunk/product/build/jbossesb-server-4.5.GA
          
           JAVA: /opt/java/jdks/current/bin/java
           ...
          
           CLASSPATH: /opt/jboss/esb/trunk/product/build/jbossesb-server-4.5.GA/bin/run.jar:/opt/java/jdks/current/lib/tools.jar
          
          

          Does the CLASSPATH look correct? com.sun.tools.javac.Main can be found in tools.jar.

          Regards,

          /Daniel

          • 2. Re: SOAP Client / WISE invocation error
            maeste

            At a first look, It seems you are using a jre to run your server, while wise require a jdk.
            Daniel's suggestion to check your classpath is perfect since the error is saying you haven't tools.jar in your classpath

            • 3. Re: SOAP Client / WISE invocation error

              You were bang on the money. I had missed adding tools.jar to the server class path. I had added to my system classpath but the server never picked it up, but editing the server class path resolved the issue. Now I get the following error.

              I would trust this is also due to the class path issue...

              17:46:26,966 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
              17:46:26,966 INFO [STDOUT] Request map is: {toWhom=Jimbo}
              17:46:26,966 INFO [STDOUT] &&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&&
              17:46:26,974 INFO [STDOUT] parsing WSDL...
              17:46:26,996 INFO [STDOUT] generating code...
              17:46:26,998 INFO [STDOUT] it/javalinux/wise/HelloWorld.java
              17:46:27,000 INFO [STDOUT] it/javalinux/wise/HelloWorldWSService.java
              17:46:27,002 INFO [STDOUT] it/javalinux/wise/ObjectFactory.java
              17:46:27,004 INFO [STDOUT] it/javalinux/wise/SayHello.java
              17:46:27,006 INFO [STDOUT] it/javalinux/wise/SayHelloResponse.java
              17:46:27,007 INFO [STDOUT] it/javalinux/wise/package-info.java
              17:46:27,008 INFO [STDOUT]
              compiling code...
              17:46:27,008 INFO [STDOUT] javac -d /tmp/HelloWorldWS -classpath /home/ashwin/jboss-4.2.3.GA/server/default/deploy/soap.esb/jboss-jaxws.jar:/home/ashwin/jboss-4.2.3.GA/server/default/deploy/jbossws.sar/jaxb-api.jar:/home/ashwin/jboss-4.2.3.GA/server/default/deploy/jbossws.sar/jaxb-impl.jar: -Xbootclasspath/p:/home/ashwin/jboss-4.2.3.GA/server/default/lib/jboss-jaxws-ext.jar:/home/ashwin/jboss-4.2.3.GA/server/default/tmp/deploy/tmp6528507124764586991jaxb-api.jar /tmp/src/HelloWorldWS/it/javalinux/wise/HelloWorld.java /tmp/src/HelloWorldWS/it/javalinux/wise/HelloWorldWSService.java /tmp/src/HelloWorldWS/it/javalinux/wise/ObjectFactory.java /tmp/src/HelloWorldWS/it/javalinux/wise/SayHello.java /tmp/src/HelloWorldWS/it/javalinux/wise/SayHelloResponse.java /tmp/src/HelloWorldWS/it/javalinux/wise/package-info.java
              17:46:27,136 ERROR [STDERR] it.javalinux.wise.core.exceptions.WiseRuntimeException: Error occurred while consuming wsdl: /tmp/Wise1.xml
              17:46:27,136 ERROR [STDERR] at it.javalinux.wise.core.exceptions.WiseRuntimeException.rethrow(WiseRuntimeException.java:44)
              17:46:27,136 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:151)
              17:46:27,137 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:94)
              17:46:27,137 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClientFactory.getClient(WSDynamicClientFactory.java:120)
              17:46:27,137 ERROR [STDERR] at org.jboss.soa.esb.actions.soap.wise.SOAPClient.process(SOAPClient.java:225)
              17:46:27,137 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.ActionProcessingPipeline.process(ActionProcessingPipeline.java:316)
              17:46:27,137 ERROR [STDERR] at org.jboss.soa.esb.listeners.message.MessageAwareListener$TransactionalRunner.run(MessageAwareListener.java:530)
              17:46:27,137 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:650)
              17:46:27,137 ERROR [STDERR] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:675)
              17:46:27,137 ERROR [STDERR] at java.lang.Thread.run(Thread.java:595)
              17:46:27,138 ERROR [STDERR] Caused by: javax.xml.ws.WebServiceException: Unable to load Provider: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
              17:46:27,138 ERROR [STDERR] at javax.xml.ws.spi.Provider.provider(Provider.java:90)
              17:46:27,138 ERROR [STDERR] at javax.xml.ws.Service.(Service.java:81)
              17:46:27,138 ERROR [STDERR] at it.javalinux.wise.HelloWorldWSService.(HelloWorldWSService.java:45)
              17:46:27,138 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              17:46:27,138 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              17:46:27,138 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              17:46:27,138 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              17:46:27,139 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:350)
              17:46:27,139 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:303)
              17:46:27,139 ERROR [STDERR] at it.javalinux.wise.core.client.WSDynamicClient.init(WSDynamicClient.java:145)
              17:46:27,139 ERROR [STDERR] ... 8 more
              17:46:27,139 ERROR [STDERR] Caused by: java.lang.IllegalStateException: Failed to load javax.xml.ws.spi.Provider: com.sun.xml.ws.spi.ProviderImpl
              17:46:27,139 ERROR [STDERR] at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:96)
              17:46:27,139 ERROR [STDERR] at javax.xml.ws.spi.Provider.provider(Provider.java:82)
              17:46:27,139 ERROR [STDERR] ... 17 more
              17:46:27,140 ERROR [STDERR] Caused by: java.lang.NoClassDefFoundError
              17:46:27,140 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
              17:46:27,140 ERROR [STDERR] at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39)
              17:46:27,140 ERROR [STDERR] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27)
              17:46:27,140 ERROR [STDERR] at java.lang.reflect.Constructor.newInstance(Constructor.java:494)
              17:46:27,140 ERROR [STDERR] at java.lang.Class.newInstance0(Class.java:350)
              17:46:27,140 ERROR [STDERR] at java.lang.Class.newInstance(Class.java:303)
              17:46:27,140 ERROR [STDERR] at javax.xml.ws.spi.ProviderLoader.loadProvider(ProviderLoader.java:91)
              17:46:27,141 ERROR [STDERR] ... 18 more

              • 4. Re: SOAP Client / WISE invocation error

                I guess i need to add the jaxws-rt.jar to classpath. Would adding to server classpath resolve this? or should wise know about the location of this? if so how can I add this to wise configuration?

                • 5. Re: SOAP Client / WISE invocation error

                  thanks guys, got it working.

                  I am interested in contributing to wise, do let me know if you need to help out in anyway (bug fixes, coding etc)

                  • 6. Re: SOAP Client / WISE invocation error
                    maeste

                     

                    "ashwindesikan" wrote:
                    thanks guys, got it working.

                    I am interested in contributing to wise, do let me know if you need to help out in anyway (bug fixes, coding etc)


                    Great!
                    Please contact me directly (mail on Wise's team page).