Hi Heath, I dont have the same setup as you, but I tried your command lines on a PC with java 1.5, but should be ok - it works for me. (replacing : with ; for classpath separator, of course)
I would try running javac and java with -verbose, and see what output you get. I assume you are running both the commands from the same directory. The class in question is loaded from axis.jar: [Loaded org.apache.axis.client.Service from file:/C:/axis-1_3/lib/axis.jar] -K --- Heath Raftery <[EMAIL PROTECTED]> wrote: > Hi Chetan, > > On 29/10/2005, at 1:44 AM, Wagle Chetan wrote: > > > Hi Heath, > > > > Have you double-checked for all the "obvious" mistakes such as: > > > > 1. Path to Java being different from path to javac > > % which javac > /usr/bin/javac > % which java > /usr/bin/java > > > 2. The jars being FTPd in ASCII mode instead of binary > > etc etc > > They were downloaded in a tar.gz which expanded without a problem. > Wouldn't I have compilation issues if the jars were corrupt? > > > Also, the javac command does not support a -cp option - which > > version of > > Java are you using? > > Oops, sorry, it was the -classpath flag to javac. > > % java -version > java version "1.4.2_09" > Java(TM) 2 Runtime Environment, Standard Edition (build 1.4.2_09-232) > Java HotSpot(TM) Client VM (build 1.4.2-54, mixed mode) > > > Regards, > > Chetan > > Cheers. I'm really stuck here - shouldn't this be a simple problem? > Heath > > > > > -----Original Message----- > > From: Heath Raftery [mailto:[EMAIL PROTECTED] > > Sent: Friday, October 28, 2005 10:36 AM > > To: axis-user@ws.apache.org > > Subject: NoClassDefFoundError for Service when trying to run > > TestClient > > > > Apologies if this is a repost - I sent from the wrong address and > > think it may have been dropped. > > > > Folks, I've been battling with this for quite some time, and despite > > finding similar stories on this mailing list and else where, still > > don't have a solution for it. I hope someone can provide a simple > > solution, because the problem itself doesn't seem that involved. > > > > Tried axis-1_2_1 and axis-1_3 with the same results. Dev system is > > Mac OS X 10.4.2, using the command line (but the same problem appears > > in XCode. > > > > I'm simply doing the following: > > > > % javac -cp lib/axis.jar:lib/jaxrpc.jar:lib/saaj.jar:lib/commons- > > discovery-0.2.jar:lib/commons-logging-1.0.4.jar:lib/ > > wsdl4j-1.5.1.jar:. samples/userguide/example1/TestClient.java > > > > Which succeeds without a problem. I then try to execute the resulting > > class: > > > > % java -cp lib/axis.jar:lib/jaxrpc.jar:lib/saaj.jar:lib/commons- > > discovery-0.2.jar:lib/commons-logging-1.0.4.jar:lib/ > > wsdl4j-1.5.1.jar:. samples.userguide.example1.TestClient > > > > and get this error: > > > > Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/ > > axis/client/Service > > at samples.userguide.example1.TestClient.main > > (TestClient.java:31) > > > > In the src distributions, Service is definitely there, but regardless > > of version, -cp arguments, bin or src distribution, I can't get any > > further. Why can Java find the Service class at compile time but not > > at run time? > > > > Heath > > > > The information contained in this e-mail may be confidential and is > > intended solely for the use of the named addressee. > > Access, copying or re-use of the e-mail or any information > > contained therein by any other person is not authorized. > > If you are not the intended recipient please notify us immediately > > by returning the e-mail to the originator.(17b) > > > > > > Ketan Deshpande [EMAIL PROTECTED] __________________________________ Yahoo! Mail - PC Magazine Editors' Choice 2005 http://mail.yahoo.com