[jboss-user] [JBossWS] - NoClassDefFoundError using Eclipse/JUnit

nlaney do-not-reply at jboss.com
Tue Feb 5 00:45:04 EST 2008


hello, I'm accessing a WS running on JBoss 4.2.2 using JBossWS 2.0.3

I've generated the service artifacts using wsconsume and I'm getting a NoClassDefFoundError running the client code as a JUnit or Java app.

The same test runs OK from the command line using wsrunclient, or at least when copying the generated cmd line string into a cmd prompt, and it works when running the test during the Maven build lifecycle.

I would like to be able to run the tests in the Eclipse WTP 2.0 workbench. Any help would be appreciated. The test is just a basic HelloWorld, and the stacktrace is:

java.lang.NoClassDefFoundError: com/sun/xml/messaging/saaj/soap/AttachmentPartImpl
	at com.sun.xml.ws.message.AttachmentUnmarshallerImpl.(AttachmentUnmarshallerImpl.java:55)
	at com.sun.xml.ws.client.sei.ResponseBuilder$DocLit.readResponse(ResponseBuilder.java:500)
	at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:242)
	at com.sun.xml.ws.client.sei.SyncMethodHandler.invoke(SyncMethodHandler.java:210)
	at com.sun.xml.ws.client.sei.SEIStub.invoke(SEIStub.java:103)
	at $Proxy25.findAll(Unknown Source)
	at org.MyTest.test(MyTest.java:38)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at junit.framework.TestCase.runTest(TestCase.java:164)
	at junit.framework.TestCase.runBare(TestCase.java:130)
	at junit.framework.TestResult$1.protect(TestResult.java:106)
	at junit.framework.TestResult.runProtected(TestResult.java:124)
	at junit.framework.TestResult.run(TestResult.java:109)
	at junit.framework.TestCase.run(TestCase.java:120)
	at junit.framework.TestSuite.runTest(TestSuite.java:230)
	at junit.framework.TestSuite.run(TestSuite.java:225)
	at org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:130)
	at org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
	at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
Caused by: java.lang.ClassNotFoundException: com.sun.xml.messaging.saaj.soap.AttachmentPartImpl
	at java.net.URLClassLoader$1.run(Unknown Source)
	at java.security.AccessController.doPrivileged(Native Method)
	at java.net.URLClassLoader.findClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClass(Unknown Source)
	at java.lang.ClassLoader.loadClassInternal(Unknown Source)
	... 25 more

Paste stack traces into this console and follow hyperlinks to source code.



View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4126438#4126438

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4126438



More information about the jboss-user mailing list