I am not so well versed in J2EE. I have developed one EJB project named 'ejbs'. And I have an EJB Client (running on a different JVM) which calls a remote method of a session bean of the EJB project.
I have added one folder named 'lib' in the EJB project 'ejbs' and added a jar file named external.jar file containing a java class file External.class. The session bean in the ejb project uses External class. So I have updated the location of this jar file in the Java Build Path of the ejb project 'ejbs'. Hence when I build the project, there is no compilation error. But there is a runtime error java.lang.NoClassDefFoundError: clients.ExternalClass when the client sends a request to the session bean.
Does it mean that setting the Java Build Path of the ejb project which uses External.class (contained in external.jar) is not enough for the server at run-time? Do I have to update the path of external.jar somewhere else too? If so please let me know where.
Nirmal Mukundan wrote:once deployed, you would be calling the session bean using a java client. please ensure that you have set the class path properly.
I have set the classpath properly on the server side using Java Build Path for the ejb project 'ejbs'. I have added the name of the jar file in the Manifest file of the EAR project but still no progress.
WHAT is your favorite color? Blue, no yellow, ahhhhhhh! Tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop