Win a copy of Murach's Python Programming this week in the Jython/Python forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

NoClassDefFoundError  RSS feed

 
Ramya Iyer
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have CTMTEAR with CTMTEAREJB as the EJB Module. There is another module named as PROXIES that holds this class com/boa/cs/business/accountbooking/AccountBookingServiceLocator

CTMTEAREJB has reference to the above project PROXIES. and this project is also added to the lib folder of CTMTEAR. Why I am getting this error?


11/21/05 12:25:51:854 EST] 3d9384ad ApplicationMg A WSVR0200I: Starting application: CTMTEAR
[11/21/05 12:25:51:974 EST] 3d9384ad EJBContainerI I WSVR0207I: Preparing to start EJB jar: CTMTEAREJB.jar
[11/21/05 12:26:06:065 EST] 3d9384ad EJBContainerI I WSVR0037I: Starting EJB jar: CTMTEAREJB.jar
[11/21/05 12:26:12:435 EST] 3d9384ad EJBContainerI E WSVR0040E: addEjbModule failed for CTMTEAREJB.jar [class com.ibm.ws.runtime.component.DeployedModuleImpl]
java.lang.NoClassDefFoundError: com/boa/cs/business/accountbooking/AccountBookingServiceLocator
at java.lang.Class.getDeclaredConstructors0(Native Method)
at java.lang.Class.privateGetDeclaredConstructors(Class.java:1716)
at java.lang.Class.getConstructor1(Class.java:1894)
at java.lang.Class.newInstance3(Class.java:327)
at java.lang.Class.newInstance(Class.java:301)
at com.ibm.ejs.container.EJSContainer.loadBeanMetaData(EJSContainer.java:1349)
at com.ibm.ejs.container.EJSContainer.getHomeWrapperCommon(EJSContainer.java:1012)
at com.ibm.ejs.container.EJSContainer.getHomeInstance(EJSContainer.java:934)
at com.ibm.ejs.container.EJSContainer.startBean(EJSContainer.java:913)
at com.ibm.ws.runtime.component.EJBContainerImpl.startBean(EJBContainerImpl.java:1301)
at com.ibm.ws.runtime.component.EJBContainerImpl.install(EJBContainerImpl.java:1034)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:1508)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:505)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:808)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:354)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:578)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:299)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:256)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ApplicationServerImpl.start(ApplicationServerImpl.java:128)
at com.ibm.ws.runtime.component.ContainerImpl.startComponents(ContainerImpl.java:536)
at com.ibm.ws.runtime.component.ContainerImpl.start(ContainerImpl.java:413)
at com.ibm.ws.runtime.component.ServerImpl.start(ServerImpl.java:183)
at com.ibm.ws.runtime.WsServer.start(WsServer.java:128)
at com.ibm.ws.runtime.WsServer.main(WsServer.java:225)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:41)
at java.lang.reflect.Method.invoke(Method.java:386)
at com.ibm.ws.bootstrap.WSLauncher.main(WSLauncher.java:105)
at com.ibm.etools.websphere.tools.runner.api.ServerRunnerV5$1.run(ServerRunnerV5.java:97)
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Ramya,

I�m assuming that you have an ear, CTMTEAR.ear that contains an ejb module CTMTEAREJB.jar and another library PROXIES.jar. If that�s correct, then you probably need to understand your container�s classloading architecture first. To give you an example consider war modules. If you add a jar to the WEB-INF/lib folder, the container will automatically load that library making it available to other components within the war at run time. There is nothing like that regarding EJB modules. Hence no matter where you pack your PROXIES.jar within your ear, the container will not be able to resolve the dependency at run time. The only standard way (they might be other non-standard container specific ways of doing it though) is to edit the manifest file of your ejb module. You can edit the manifest, adding the next line:

In this example I assumed that your PROXIES.jar is under the root of your ear. Otherwise you need to specify the appropriate path, starting from the ear�s root.
Regards.
 
Ramya Iyer
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks. That was very helpful
 
Valentin Tanase
Ranch Hand
Posts: 704
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You're very welcome Ramya
 
Ramya Iyer
Ranch Hand
Posts: 66
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Valentin,

Could you please look into another post of mine on PMGR6022E: Error using adapter to create.

I have been working on this error for many hours. It would be great if you can let me know of a solution
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!