problem: Exception in thread "main" java.lang.NoClassDefFoundError: javax/x

hi,

i am facing some problem while executing the program about web services,

i have followed every step in detail as given in the tutorial Developing web services with j2ee 1.4, its able to compile my program but i am not able to execute the program,

the deployment was successful and i was able to view that math-service/math?wsdl.

then i started to create web service client using static stub, i was able to compile and got the classfiles exactly as specified but when i execute it with

the command

c:/sun/appserver/apps/static/stub/java -classpath build sstub.MathClient

it gives an error saying that

Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Stub

i have also copied all the library files *.jar in lib and also in the directory endorsed to the directory jdk/jre/lib/ext even then its not working, i have also checked to make sure i am using the right version, the version i am using is

java version "1.5.0_11"

Java(TM) 2 Runtime Environment, Standard Edition (build 1.5.0_11-b03

Java HotSpot(TM) Client VM (build 1.5.0_11-b03, mixed mode, sharing)

which i got thro cmd java -version

plz help

Regards

Ravi

[1246 byte] By [ravi.mha] at [2007-11-27 0:24:55]
# 1

Hi all,

I getting the same problem like what our friend mailed above..

RunTIme Error -- Exception in thread "main" java.lang.NoClassDefFoundError: javax/xml/rpc/Stub

I followed each and every step what they given.

So,please any one of our group member answer for this problem as quick as possible.

Awaiting for yours reply..

Thanks and Regards,

Sriram

sriram.contact@gmail.coma at 2007-7-11 22:22:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...
# 2

i have got the solution my friend.

i had set the java_home for jdk1.4 and was using jdk vrsion 1.5 for runtime, tats why the problem i guess.

do as i did, since u have sun server intalled, when u execute the javac or java give the command as full path name to J2EE_HOME/jdk/bin/java or javac then all the programs ll execute correctly and even then if u dont get to execute the program, then find the packages tat it asks for from net its jaxrpc somthing.jar and put the jar files in the lib directory, set the path JAVA_HOME to j2ee_home/ jdk/ or make sure u use right version and specify the same in java_home. waiting for ur replies whether it worked fine or not, i couldnt do dynamic proxy since it was giving some errors, ll find it out and let u know.

have fun in doing this

ravi.mha at 2007-7-11 22:22:18 > top of Java-index,Enterprise & Remote Computing,Enterprise Technologies...