-
Bug
-
Resolution: Won't Do
-
Major
-
None
-
None
-
None
One instance of my cluster does not want to be in RUNNING state. When I try to start it the following exception is thrown. I cleared OSGI cache and genereted/ files in my domain.
Is it beacause EJB container wants to create MDB when Weld is not yet initialized?
When I look into JCDIServiceImpl code I see the beanManager instance may be null.
Is it possible to initalize Weld first before EJB container starts createing MDB?
Why is that? How to overcome this problem?
[javax.enterprise.system.container.ejb.mdb.org.glassfish.ejb.mdb] [tid: _ThreadID=194 _ThreadName=__ejb-thread-pool1] [timeMillis: 457104178570] [levelValue: 1000] [[ java.lang.reflect.InvocationTargetExceptionjava.lang.NullPointerException at org.glassfish.weld.services.JCDIServiceImpl._createJCDIInjectionContext(JCDIServiceImpl.java:195) at org.glassfish.weld.services.JCDIServiceImpl.createJCDIInjectionContext(JCDIServiceImpl.java:179) at com.sun.ejb.containers.BaseContainer.createEjbInstanceAndContext(BaseContainer.java:1696) at org.glassfish.ejb.mdb.MessageBeanContainer.createMessageDrivenEJB(MessageBeanContainer.java:789) at org.glassfish.ejb.mdb.MessageBeanContainer.access$100(MessageBeanContainer.java:119) at org.glassfish.ejb.mdb.MessageBeanContainer$MessageBeanContextFactory.create(MessageBeanContainer.java:547) at com.sun.ejb.containers.util.pool.NonBlockingPool.preload(NonBlockingPool.java:337) at com.sun.ejb.containers.util.pool.NonBlockingPool.doResize(NonBlockingPool.java:585) at com.sun.ejb.containers.util.pool.NonBlockingPool$IdleBeanWork.run(NonBlockingPool.java:683) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
My MDB class:
@TransactionManagement(TransactionManagementType.BEAN) public class JmsReceiver implements MessageListener { @Inject private Logger l; @Inject private Service service; @Override public void onMessage(Message message) { logger.("Begin processing {}",message) //some stuff here.... }