permaculture playing cards
The moose likes Websphere and the fly likes NoClassDefFoundError: com/ibm/ejs/container/EJSHome Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Products » Websphere
Bookmark "NoClassDefFoundError: com/ibm/ejs/container/EJSHome" Watch "NoClassDefFoundError: com/ibm/ejs/container/EJSHome" New topic

NoClassDefFoundError: com/ibm/ejs/container/EJSHome

Ashok Sharma

Joined: Jul 19, 2002
Posts: 2
My deployable ear file seems to deploy successfully. When try to start up the EJB's from the WAS admin client GUI, a window pops-up saying that it was successfully started,
but the log shows the error below.
[7/19/02 11:14:23:127 EDT] 3d120a1e EJBEngine I WSVR0037I: Starting EJB
jar: /usr/WebSphere/AppServer/installedApps/UAE11.ear/UAEAdminEJB11.jar
[7/19/02 11:14:23:187 EDT] 3d120a1e EJBEngine X WSVR0040E: addEjbModule
failed for
(desiredExecutionState: START) (uri: UAEAdminEJB11.jar)
java.lang.NoClassDefFoundError: com/ibm/ejs/container/EJSHome
at java.lang.ClassLoader.defineClass0(Native Method)
at java.lang.ClassLoader.defineClass(
Help is appriciated.
Paul McKenna
Ugly Redneck
Ranch Hand

Joined: Jul 08, 2000
Posts: 1006
What version of Websphere are you using and are you using Visual Age for Java to deploy your beans? If so.. try exporting the deployed jar version of your bean.
Also another problem could be that the class path at the application server level is incorrect. Make sure that you have the class path defined to all the classes of your project and also all the jars being used by your project

Commentary From the Sidelines of history
Ashok Sharma

Joined: Jul 19, 2002
Posts: 2
I am using WAS 4.0 & no visual age for deployment.
Kiran Kumar
Ranch Hand

Joined: May 18, 2001
Posts: 107
this is basically the exception which is generated when u don't have all the dependent classes or the classes which u r importing in ur ej bean class. so make sure that u have added all the importing classes, packages into the same jar file as the bean.
since when the server is started it will try to create the pool of the ejbs and at that time it will ask for all these classes.

hope this helps

Thanks<br /> <br />Kiran <br /> <br />SCEA, SCJP 1.4,<br /> <br />"First they ignore u, then they laugh at u, then they fight u, <br />then u will win<br /> <br />Mahatma Gandhi"
gary mach

Joined: Mar 01, 2005
Posts: 1
I had this problem when I made a new POJO project that my EJB project (the one that my server failed to raise) depended on, and entered it into the server. I am working with WSAD, and the solution was actually simple, go into the server settings, environment tab, and choose the "Add External Folder" button, to add the top level of the "out" folder that contained the classes in my POJO project.
This is a semi-obvious thing, but the error was confusing, because it complained about basic stuff, whereas the real problem was that the EJB failed to load because the server couldn't find stuff from the POJO project.
madhura kkk

Joined: Oct 05, 2006
Posts: 2
Actually I have added the required output path to the server configurations through the Add External Path option. However it is still giving me the same error The user-provided class "" needed by the EnterpriseBean could not be found or loaded.
java.lang.NoClassDefFoundError: com/ibm/ejs/container/EJSHome
Was this setting working only coz POJOs were used in the application instead of EJB? Btw I am working on WSAD 5.1 (migrating code from 3.5 to 5.1.x).
I agree. Here's the link:
subject: NoClassDefFoundError: com/ibm/ejs/container/EJSHome
It's not a secret anymore!