Discussion:
Problem in running Client class
(too old to reply)
s***@gmail.com
2006-03-16 12:26:31 UTC
Permalink
Hi,
Am new to EJB. I wrote a stateless bean, complied and deployed it
successfully. When i run the client class am getting this error.

Exception in thread "main" java.lang.NoClassDefFoundError: Client
(wrong name: s
ession/Client)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
at
java.net.URLClassLoader.access$100(URLClassLoader.java:51)........................

my class path is as below:
C:\bea\jdk131_03\lib\tools.jar;C:\bea\weblogic700\server\lib\weblogic_sp.jar;C:\
bea\weblogic700\server\lib\weblogic.jar;C:\bea\weblogic700\server\lib\weblogic.j
ar;C:\bea\jdk131_03\lib\tools.jar;.

I use weblogic 7, j2sdk1.3.1. Please solve this problem as soon as
possible.

Thanks in advance
Jonzi
2006-03-20 18:12:03 UTC
Permalink
Firstly, you don't need the weblogic.jar and tools.jar file including
twice.
Fixing the above won't solve the problem but this one might. You also
need to include your EJB JAR file in the classpath. The client needs
the Home and Remote interfaces in order to run successfully.
m***@gmail.com
2006-03-29 17:30:54 UTC
Permalink
Hi ,

If you are running in a windows environment classpath will not work
efficiently better we can have the classpath inline like below

java -classpath C:\bea\weblogic700\server\lib\weblogic.jar;.;<bean jar
path> <class_name>

try in that way it may work if not inform me i will give you another
solution

regards
M.Shiva Ram Murthy
Post by s***@gmail.com
Hi,
Am new to EJB. I wrote a stateless bean, complied and deployed it
successfully. When i run the client class am getting this error.
Exception in thread "main" java.lang.NoClassDefFoundError: Client
(wrong name: s
ession/Client)
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:488)
at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:10
at
java.net.URLClassLoader.access$100(URLClassLoader.java:51)........................
C:\bea\jdk131_03\lib\tools.jar;C:\bea\weblogic700\server\lib\weblogic_sp.jar;C:\
bea\weblogic700\server\lib\weblogic.jar;C:\bea\weblogic700\server\lib\weblogic.j
ar;C:\bea\jdk131_03\lib\tools.jar;.
I use weblogic 7, j2sdk1.3.1. Please solve this problem as soon as
possible.
Thanks in advance
Loading...