Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Issue with EJB 2.0 MDB, WAS 6.1

98 views
Skip to first unread message

arvi...@yahoo.com

unread,
Jan 14, 2008, 12:23:21 PM1/14/08
to
I am using WAS 6.1. I created a new EJB Project and picked J2EE 1.4 and EJB2 while doing that. I have a simple MDB that does nothing but print out a message to the console in the onMessage method. This MDB should get triggered when a message arrives on a Queue called IN.Q , jndi name jms/IN.Q.
I can deploy and install the application using the Admin console but when i try to start the app I get this error: Can someone point me to what I am doing wrong here? Thanks!

CNTR0035E: EJB container caught java.lang.NullPointerException
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.loadGeneratedImplementationClasses(EJBMDOrchestrator.java:4844)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInit(EJBMDOrchestrator.java:1490)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.processBean(EJBMDOrchestrator.java:1044)
at com.ibm.ws.runtime.component.EJBContainerImpl.startModule(EJBContainerImpl.java:2370)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3343)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1145)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:818)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2131)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:341)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
and is throwing com.ibm.ejs.container.ContainerException: Failed to initialize BeanMetaData instance - caught Throwable; nested exception is:
java.lang.NullPointerException.

WSVR0040E: addEjbModule failed for ESB-POC-MonitoringService-EJB.jar [class com.ibm.ws.runtime.component.DeployedEJBModuleImpl]
com.ibm.ws.exception.RuntimeWarning: com.ibm.ejs.container.ContainerException: Failed to initialize BeanMetaData instance - caught Throwable; nested exception is:
java.lang.NullPointerException
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.processBean(EJBMDOrchestrator.java:1056)
at com.ibm.ws.runtime.component.EJBContainerImpl.startModule(EJBContainerImpl.java:2370)
at com.ibm.ws.runtime.component.EJBContainerImpl.start(EJBContainerImpl.java:3343)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.start(ApplicationMgrImpl.java:1312)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.fireDeployedObjectStart(DeployedApplicationImpl.java:1145)
at com.ibm.ws.runtime.component.DeployedModuleImpl.start(DeployedModuleImpl.java:587)
at com.ibm.ws.runtime.component.DeployedApplicationImpl.start(DeployedApplicationImpl.java:818)
at com.ibm.ws.runtime.component.ApplicationMgrImpl.startApplication(ApplicationMgrImpl.java:965)
at com.ibm.ws.runtime.component.ApplicationMgrImpl$AppInitializer.run(ApplicationMgrImpl.java:2131)
at com.ibm.wsspi.runtime.component.WsComponentImpl$_AsynchInitializer.run(WsComponentImpl.java:341)
at com.ibm.ws.util.ThreadPool$Worker.run(ThreadPool.java:1469)
Caused by: com.ibm.ejs.container.ContainerException: Failed to initialize BeanMetaData instance - caught Throwable; nested exception is:
java.lang.NullPointerException
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.loadGeneratedImplementationClasses(EJBMDOrchestrator.java:5326)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.finishBMDInit(EJBMDOrchestrator.java:1490)
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.processBean(EJBMDOrchestrator.java:1044)
... 10 more
Caused by: java.lang.NullPointerException
at com.ibm.ws.metadata.ejb.EJBMDOrchestrator.loadGeneratedImplementationClasses(EJBMDOrchestrator.java:4844)
... 12 more

I have attached the ejb-jar.xml. Here is the ejb-jar-bnd.xmi:


<?xml version="1.0" encoding="UTF-8"?>
<ejbbnd:EJBJarBinding xmi:version="2.0"
xmlns:xmi="http://www.omg.org/XMI" xmlns:commonbnd="commonbnd.xmi"
xmlns:ejbbnd="ejbbnd.xmi" xmlns:ejb="ejb.xmi" xmlns:common="common.xmi"
xmi:id="EJBJarBinding_1">

<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_1" />

<ejbBindings xmi:type="ejbbnd:MessageDrivenBeanBinding"
xmi:id="Message_bnd_1" listenerInputPortName="MonitorListenerPort">
<enterpriseBean xmi:type="ejb:MessageDriven"
href="META-INF/ejb-jar.xml#MessageDriven_1" />
<!-- ML FIX. enterpriseBean xmi:type="ejb:MessageDriven" href="META-INF/ejb-jar.xml#MessageDriven_MonitorMDB"/-->

<resRefBindings xmi:id="ResourceRefBinding_1"
jndiName="jms/QCF">
<bindingResourceRef
href="META-INF/ejb-jar.xml#ResourceRef_1" />
</resRefBindings>
<resourceEnvRefBindings
xmi:id="ResourceEnvRefBinding_1"
jndiName="jms/IN.Q">
<bindingResourceEnvRef
href="META-INF/ejb-jar.xml#ResourceEnvRef_1" />
</resourceEnvRefBindings>

</ejbBindings>

</ejbbnd:EJBJarBinding>


And the ibm-ejb-jar-ext.xmi:
<ejbext:EJBJarExtension xmi:version="2.0" xmlns:xmi="http://www.omg.org/XMI" xmlns:ejbext="ejbext.xmi" xmlns:ejb="ejb.xmi" xmi:id="ejb-jar_ID_Ext">

<ejbJar href="META-INF/ejb-jar.xml#ejb-jar_1"/>

</ejbext:EJBJarExtension>

Randy Schnier

unread,
Jan 14, 2008, 4:53:54 PM1/14/08
to
[Note, this answer also was posted to the EJB 3.0 feature pack beta forum where the question was originally posted.]

Hi,
Judging from where the exception is happening, it looks like you may not have run the EJBDeploy tool on your EJB 2.0 module. If your module is 2.1 or earlier, you still need to run EJBDeploy; the new Just-In-Time deployment feature only applies to modules at the EJB 3.0 level.

Regards...Randy

arvi...@yahoo.com

unread,
Jan 14, 2008, 5:31:53 PM1/14/08
to
Thanks! Since I am a newbie to EJB, I have some questions:
How would i run this task? (I use myeclipse) and what would this accomplish?

Thanks!

kunal...@gmail.com

unread,
Feb 13, 2009, 1:15:57 AM2/13/09
to
Wow, thanks
same story, am newbiw to EJBs and got my solution here, thnx :)
0 new messages