2 Replies Latest reply on Dec 4, 2009 9:10 PM by Rick Kilcoyne

    Seam-dependent MDBs

    Rick Kilcoyne Newbie

      I've been working on this issue for a couple days now, and despite some posts here and elsewhere, I cannot get an MDB to deploy AFTER Seam is up and running.


      I cannot assume incoming message will stop while the App Server is stopped/restarted. This is not a problem using a straight-up MDB, however when I designate my MDB as a Seam component, its startup is busted because the component is either trying to start outside the Seam context (I fixed this) or the following transaction errors:


      javax.ejb.EJBTransactionRolledbackException: java.lang.NullPointerException
              at org.jboss.ejb3.tx.Ejb3TxPolicy.handleInCallerTx(Ejb3TxPolicy.java:115)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:130)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:194)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.tx.NullInterceptor.invoke(NullInterceptor.java:42)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.security.Ejb3AuthenticationInterceptorv2.invoke(Ejb3AuthenticationInterceptorv2.java:80)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.BlockContainerShutdownInterceptor.invoke(BlockContainerShutdownInterceptor.java:67)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.ejb3.mdb.MessagingContainer.localInvoke(MessagingContainer.java:282)
              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.delivery(MessageInflowLocalProxy.java:270)
              at org.jboss.ejb3.mdb.inflow.MessageInflowLocalProxy.invoke(MessageInflowLocalProxy.java:140)
              at $Proxy347.onMessage(Unknown Source)
              at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:243)
              at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:664)
              at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:42)
              at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:780)
              at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:96)
              at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
              at java.lang.Thread.run(Thread.java:637)
      Caused by: java.lang.RuntimeException: java.lang.NullPointerException
              at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1123)
              at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1133)
              at org.jboss.ejb3.EJBContainer.invokePostConstruct(EJBContainer.java:1144)
              at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:93)
              at org.jboss.ejb3.pool.AbstractPool.create(AbstractPool.java:73)
              at org.jboss.ejb3.pool.StrictMaxPool.get(StrictMaxPool.java:146)
              at org.jboss.ejb3.stateless.StatelessInstanceInterceptor.invoke(StatelessInstanceInterceptor.java:58)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:102)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
              ... 22 more
      Caused by: java.lang.NullPointerException
              at org.jboss.seam.intercept.RootInterceptor.init(RootInterceptor.java:50)
              at org.jboss.seam.intercept.SessionBeanInterceptor.postConstruct(SessionBeanInterceptor.java:102)
              at sun.reflect.GeneratedMethodAccessor269.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:597)
              at org.jboss.ejb3.interceptors.aop.LifecycleCallbackInterceptorMethodInterceptor.invoke(LifecycleCallbackInterceptorMethodInterceptor.java:80)
              at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
              at org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor.setup(InvocationContextInterceptor.java:88)
              at org.jboss.aop.advice.org.jboss.ejb3.interceptors.aop.InvocationContextInterceptor_z_setup_1089614993.invoke(InvocationContextInterceptor_z_setup_1089614993.java)
              at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
              at org.jboss.aspects.currentinvocation.CurrentInvocationInterceptor.invoke(CurrentInvocationInterceptor.java:67)
              at org.jboss.aop.joinpoint.ConstructionInvocation.invokeNext(ConstructionInvocation.java:79)
              at org.jboss.ejb3.EJBContainer.invokeCallback(EJBContainer.java:1119)
              ... 30 more


      Has anyone seen a concrete example of how to make this work, or am I better off leaving Seam out of my MDBs?


      Thanks!
      Rick