• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

java.lang.NoClassDefFoundError when the EJB Client is executed

 
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Dear All,

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.

Thanks in adv,
Pankaj
 
Ranch Hand
Posts: 37
Eclipse IDE Oracle
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
once deployed, you would be calling the session bean using a java client. please ensure that you have set the class path properly.
 
Pankaj Poshirkar
Ranch Hand
Posts: 80
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.



Hi Nirmal,

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
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic