geronimo-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Monty King" <montgomery.k...@gmail.com>
Subject problem with deploying a mdb (within ear)
Date Thu, 28 Feb 2008 18:10:30 GMT
Hi,

I'm new to JEE world so please forgive all the rookie mistakes en route to
enlightenment. Firstly I completed the 5-minute tutorial. Now I'm trying to
create a MDB (EJB 3 style). I'm following the 5-min-example deployment style
(create EAR project and include EJB project in it).

Now I'm stuck with an exception that I can't understand. Here's what I have
done so far (within EJB project):
* From EJB project, I deleted the openejb-jar.xml (as per 5-min-example).
* Created a MDB called ChatRoomMDB, here's the contents:

package sample;

import javax.annotation.Resource;
import javax.ejb.ActivationConfigProperty;
import javax.ejb.MessageDriven;
import javax.ejb.MessageDrivenContext;
import javax.jms.Message;
import javax.jms.MessageListener;

@MessageDriven (activationConfig =
{
 @ActivationConfigProperty(propertyName="destinationType", propertyValue="
javax.jms.Queue"),
 @ActivationConfigProperty(propertyName="destination",
propertyValue="SendReceiveQueue")
})
public class ChatRoomMDB implements MessageListener {

 private static final long serialVersionUID = 1L;

 @Resource
 private MessageDrivenContext mdc;

 @Override
 public void onMessage(Message msg) {
  System.out.println("Rcv: " + msg);
 }

}

When I try to deploy it in app server (Geronimo 2.1 server integrated into
Eclipse with Geronimo v2.0 Server Adapter 2.0.0) I get the following:

19:01:34,703 ERROR [GBeanInstanceState] Error while starting; GBean is now
in the *FAILED* state:
abstractName="JMSSample/JMSSample-EAR/1.0/ear?J2EEApplication=JMSSample/JMSSample-EAR/1.0/ear,j2eeType=EJBModule,name=
JMSSampleEJB.jar"

*******

org.apache.openejb.OpenEJBException*: createApplication.failed [C:\Documents
and Settings\Monty\Local Settings\Temp\geronimo-deploymentUtil2807.jar]:
Error building bean 'ChatRoomMDB'. Exception: class *
java.lang.NullPointerException*: null: null

at org.apache.openejb.assembler.classic.Assembler.createApplication(*
Assembler.java:588*)

at org.apache.openejb.assembler.classic.Assembler.createEjbJar(*
Assembler.java:371*)

at org.*apache*.geronimo.openejb.OpenEjbSystemGBean.createEjbJar(*
OpenEjbSystemGBean.java:390*)

at org.apache.geronimo.openejb.EjbModuleImpl.start(*EjbModuleImpl.java:123*)

at org.apache.geronimo.openejb.EjbModuleImplGBean.doStart(*
EjbModuleImplGBean.java:39*)

at org.apache.geronimo.gbean.runtime.GBeanInstance.createInstance(*
GBeanInstance.java:998*)

at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(*
GBeanInstanceState.java:268*)

at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(*
GBeanInstanceState.java:102*)

at org.apache.geronimo.gbean.runtime.GBeanInstance.start(*GBeanInstance.java
:541*)

at org.apache.geronimo.gbean.runtime.GBeanDependency.attemptFullStart(*
GBeanDependency.java:111*)

at org.apache.geronimo.gbean.runtime.GBeanDependency.addTarget(*
GBeanDependency.java:146*)

at org.apache.geronimo.gbean.runtime.GBeanDependency$1.running(*
GBeanDependency.java:120*)

at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.fireRunningEvent(*
BasicLifecycleMonitor.java:176*)

at org.apache.geronimo.kernel.basic.BasicLifecycleMonitor.access$300(*
BasicLifecycleMonitor.java:44*)

at
org.apache.geronimo.kernel.basic.BasicLifecycleMonitor$RawLifecycleBroadcaster.fireRunningEvent
(*BasicLifecycleMonitor.java:254*)

at org.apache.geronimo.gbean.runtime.GBeanInstanceState.attemptFullStart(*
GBeanInstanceState.java:294*)

at org.apache.geronimo.gbean.runtime.GBeanInstanceState.start(*
GBeanInstanceState.java:102*)

at org.apache.geronimo.gbean.runtime.GBeanInstanceState.startRecursive(*
GBeanInstanceState.java:124*)

at org.apache.geronimo.gbean.runtime.GBeanInstance.startRecursive(*
GBeanInstance.java:555*)

at org.apache.geronimo.kernel.basic.BasicKernel.startRecursiveGBean(*
BasicKernel.java:379*)

at
org.apache.geronimo.kernel.config.ConfigurationUtil.startConfigurationGBeans
(*ConfigurationUtil.java:456*)

at org.apache.geronimo.kernel.config.KernelConfigurationManager.start(*
KernelConfigurationManager.java:187*)

at
org.apache.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration
(*SimpleConfigurationManager.java:534*)

at org.*apache*
.geronimo.kernel.config.SimpleConfigurationManager.startConfiguration(*
SimpleConfigurationManager.java:515*)

at sun.reflect.NativeMethodAccessorImpl.invoke0(*Native Method*)

at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(*
ReflectionMethodInvoker.java:34*)

at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(*
GBeanOperation.java:124*)

at org.*apache*.geronimo.gbean.runtime.GBeanInstance.invoke(*
GBeanInstance.java:867*)

at org.apache.geronimo.kernel.basic.BasicKernel.invoke(*BasicKernel.java:239
*)

at org.apache.geronimo.kernel.KernelGBean.invoke(*KernelGBean.java:342*)

at sun.reflect.GeneratedMethodAccessor163.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.lang.reflect.Method.invoke(Unknown Source)

at org.apache.geronimo.gbean.runtime.ReflectionMethodInvoker.invoke(*
ReflectionMethodInvoker.java:34*)

at org.apache.geronimo.gbean.runtime.GBeanOperation.invoke(*
GBeanOperation.java:124*)

at org.apache.geronimo.gbean.runtime.GBeanInstance.invoke(*
GBeanInstance.java:867*)

at org.apache.geronimo.kernel.basic.BasicKernel.invoke(*BasicKernel.java:239
*)

at org.apache.geronimo.system.jmx.MBeanGBeanBridge.invoke(*
MBeanGBeanBridge.java:172*)

at com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(Unknown
Source)

at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(Unknown Source)

at javax.management.remote.rmi.RMIConnectionImpl.doOperation(Unknown Source)

at javax.management.remote.rmi.RMIConnectionImpl.access$200(Unknown Source)

at javax.management.remote.rmi.RMIConnectionImpl$PrivilegedOperation.run(Unknown
Source)

at java.security.AccessController.doPrivileged(*Native Method*)

at javax.management.remote.rmi.RMIConnectionImpl.*doPrivilegedOperation*(Unknown
Source)

at javax.management.remote.rmi.RMIConnectionImpl.invoke(Unknown Source)

at sun.reflect.GeneratedMethodAccessor130.invoke(Unknown Source)

at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)

at java.*lang*.reflect.Method.invoke(Unknown Source)

at sun.rmi.server.UnicastServerRef.dispatch(Unknown Source)

at sun.rmi.transport.Transport$1.run(Unknown Source)

at java.security.AccessController.doPrivileged(*Native Method*)

at sun.rmi.transport.Transport.serviceCall(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport.handleMessages(Unknown Source)

at sun.rmi.transport.tcp.TCPTransport$ConnectionHandler.run0(Unknown Source)

at sun.*rmi*.transport.tcp.TCPTransport$ConnectionHandler.run(Unknown
Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)

at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)

at java.lang.Thread.run(Unknown Source)

Caused by: *org.apache.openejb.OpenEJBException*: Error building bean
'ChatRoomMDB'. Exception: class *java.lang.NullPointerException*: null: null

at org.apache.openejb.assembler.classic.EjbJarBuilder.build(*
EjbJarBuilder.java:64*)

at org.apache.openejb.assembler.classic.Assembler.createApplication(*
Assembler.java:491*)

... 61 *more*

Caused by: *java.lang.NullPointerException

*

at java.util.Hashtable.get(Unknown *Source*)

at org.apache.openejb.assembler.classic.EjbJarBuilder.build(*
EjbJarBuilder.java:59*)

... 62 more

19:01:34,703 ERROR [EjbModuleImpl] Module does not exist.

What am I doing wrong?

**TIA,*
*Monty

Mime
View raw message