This week's book giveaway is in the OO, Patterns, UML and Refactoring forum. We're giving away four copies of Refactoring for Software Design Smells: Managing Technical Debt and have Girish Suryanarayana, Ganesh Samarthyam & Tushar Sharma on-line! See this thread for details.
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.
once deployed, you would be calling the session bean using a java client. please ensure that you have set the class path properly.
Joined: Dec 31, 2009
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.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com
subject: java.lang.NoClassDefFoundError when the EJB Client is executed