Forums Register Login

question about calling a no-ejb class's method in ejb method

+Pie Number of slices to send: Send
I call a no-ejb class's method in ejb method,

import a.wu;
.....
public void bean_method()
{
wu k=new wu();
k.show();
}
..........
complie success,but in runTIME, throws
java.rmi.RemoteException: EJB Exception: ;
nested exception is: java.lang.NoClassDefFoundError: a/wu��
( NOTE: you must konw classpath of Class a.wu have already been set,complie success )
+Pie Number of slices to send: Send
It doesn't matter that you can compile the class -- that's a different classpath.
Make sure that your a.wu class is included inside the EJB JAR file along with your EJB classes and it should work fine.
Kyle
------------------
Kyle Brown,
Author of Enterprise Java (tm) Programming with IBM Websphere
See my homepage at http://members.aol.com/kgb1001001 for other WebSphere information.
+Pie Number of slices to send: Send
Need some more information on how wu is available in the deployed version.
Do you put it in the classpath of the application server? Alternatively you can use a J2EE application.
The following references might help:
http://www.onjava.com/pub/a/onjava/2001/06/26/ejb.html
http://www.onjava.com/pub/a/onjava/2001/07/25/ejb.html
Phil
+Pie Number of slices to send: Send
sorry, i forgot to tell you that i run my project in JBUilder5.0
,I have already set classpath of Class a.wu in jbuilder 5.0��
+Pie Number of slices to send: Send
I set path of Class a.wu to Classpath of application server.
but still can't solve question!
why?
+Pie Number of slices to send: Send
 

Originally posted by liang sun:
I set path of Class a.wu to Classpath of application server.
but still can't solve question!
why?


I think when you are not sure that your class is in the servers classpath, put your class in the lib of server or the directory where server classes are located.it should work..
Rahool
Anything worth doing well is worth doing poorly first. Just look at this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 679 times.
Similar Threads
(to Kyle Brown) question about calling a no-ejb class's method in ejb method
session bean create error() can anyone plzz help me out...
ejb create() Error java.lang. IllegalStateEx: Failed to find method for hash
RMI problem
problem in running client code
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 29, 2024 03:12:20.