Skip to Main Content

Java EE (Java Enterprise Edition) General Discussion

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Problems with SoapConnectionFactory

843833Sep 19 2005 — edited Nov 10 2008
Hi.

I wrote an application intended to be run from the command line using the Netbeans IDE. It runs fine from the IDE, but when I run it from a command line, I get the following error:

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/soap/SOAPConnectionFactory
at Retrieval.SoapClient.<init>(SoapClient.java:20)
at Retrieval.Retriever.GetUrlInformationFromAlexa(Retriever.java:108)
at Retrieval.Main.main(Main.java:58)

I thought it might be a classpath problem, but the classpath appears to be the same from both the command line and the IDE. I tried again running it from the command line as follows:

java -verbose -classpath activation.jar;saaj-api.jar;saaj-impl.jar;jaxp-api.jar;mail.jar -jar MyFile.jar <args>

It still didn't work. There IS code before this error occurs; it appears to be a run-time problem.

This is the line that appears to be causing the problem:

SOAPConnectionFactory scf = SOAPConnectionFactory.newInstance();

In the IDE, I did set the compile and run-time libraries to include:

activation.jar, saaj-api.jar, saaj-impl.jar, jaxp-api.jar

Advice/suggestions would be much appreciated.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 8 2008
Added on Sep 19 2005
5 comments
360 views