[jbossws-issues] [JBoss JIRA] Commented: (JBWS-2284) Using WSConsume on JBOSS 4.2.3.GA and JDK 1.6.0_07 leads to java.lang.NoClassDefFoundError: com/sun/tools/ws/wscompile/WsimportTool
Brendan Farragher (JIRA)
jira-events at lists.jboss.org
Mon Jun 8 10:04:56 EDT 2009
[ https://jira.jboss.org/jira/browse/JBWS-2284?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12471012#action_12471012 ]
Brendan Farragher commented on JBWS-2284:
-----------------------------------------
Ubuntu 9.04
JBoss AS 4.2.3
Java 1.5
Hemant's resolution allows the wsconsume script to run correctly, but it creates another problem when you annotate your web service method arguments with @WebParam. When you run the client code that is generated to contact the service, you get an exception stating that:
com.sun.xml.messaging.saaj.soap.ver1_1.Message1_1Impl
does not have a setProperty method. This conflict is caused by a saaj.jar file that comes packaged with webservices-rt.jar. To resolve all of this, the only thing that worked for me was getting rid of the webservices* sun jars and copying additional jar files (from the JBoss installation) into my lib/endorsed directory. My lib/endorsed directory looks like this:
activation.jar
jaxb-api.jar
jaxb-impl.jar
jaxb-xjc.jar
jaxws-rt.jar // Copied from JBoss installation root
jaxws-tools.jar // Copied from JBoss installation root
jboss-jaxws-ext.jar
jboss-jaxws.jar
serializer.jar
stax-api.jar
stax-ex.jar
streambuffer.jar
xalan.jar
xercesImpl.jar
With the exception of the ones noted, all jar files were copied from the server /client directory.
> Using WSConsume on JBOSS 4.2.3.GA and JDK 1.6.0_07 leads to java.lang.NoClassDefFoundError: com/sun/tools/ws/wscompile/WsimportTool
> -----------------------------------------------------------------------------------------------------------------------------------
>
> Key: JBWS-2284
> URL: https://jira.jboss.org/jira/browse/JBWS-2284
> Project: JBoss Web Services
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Environment: JBOSS 4.2.3.GA
> JDK 1.6.0_07
> Windows
> Reporter: Hemant Satam
>
> I have all the required files in jboss-4.2.3.GA\lib\endorsed. The classpath also ensures that jboss libraries are before jdk1.6 lib file. However on access of wsconsume the error produced is;
> JBossWS-Native stack deployed
> Exception in thread "main" java.lang.NoClassDefFoundError: com/sun/tools/ws/wscompile/WsimportTool
> at org.jboss.ws.tools.jaxws.impl.SunRIConsumerFactoryImpl.createConsumer(SunRIConsumerFact
> oryImpl.java:36)
> at org.jboss.wsf.spi.tools.WSContractConsumer.newInstance(WSContractConsumer.java:73)
> at org.jboss.wsf.spi.tools.WSContractConsumer.newInstance(WSContractConsumer.java:56)
> at org.jboss.wsf.spi.tools.cmd.WSConsume.importServices(WSConsume.java:195)
> at org.jboss.wsf.spi.tools.cmd.WSConsume.main(WSConsume.java:81)
> Caused by: java.lang.ClassNotFoundException: com.sun.tools.ws.wscompile.WsimportTool
> 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 sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:276)
> at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
> at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
> ... 5 more
> Is this a bug or something wrong that I am doing?
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jbossws-issues
mailing list