0 Replies Latest reply on Nov 30, 2011 11:28 AM by Marco Piraccini

    IllegalStateException in: JMS listener -> Action -> EJB

    Marco Piraccini Newbie

      Hi all,

       

      In JBossESB 4.10 (on JBoss6) we have a service of this type:  JMS listener -> Action -> EJB (in an EAR deployed in the same JBoss 6.0).
      The EJB code uses CDI (fires and observes some events). When that happens, the error below is raised. If we don't use the jms-listener, it works perfectly. That seems to be related to a classloader issue (see https://issues.jboss.org/browse/SEAMJMS-16).

       

      It seems to be a ClassLoading issue: the event is propagated to the HornetQ thread (why?) but no the weld singleton is set in the esb-project classloader (correctly). The questions are: why the event is propagated and how can I avoid that?

       

      2011-11-28 15:15:26,960 DEBUG [org.jboss.weld.Event] (Thread-3 (group:HornetQ-client-global-threads-2089334124)) throwing: java.lang.IllegalStateException: Singleton not set for BaseClassLoader@c2909a1{vfs:///E:/Workspace/jboss6/server/default/deploy/xxx.esb}

      at org.jboss.weld.integration.provider.JBossSingletonProvider$EarSingleton.get(JBossSingletonProvider.java:59) [:6.0.0.Final]

      at org.jboss.weld.Container.instance(Container.java:58) [:6.0.0.Final]

      at org.jboss.weld.event.DeferredEventNotification$RunInRequest.isRequestContextActive(DeferredEventNotification.java:119) [:6.0.0.Final]

      at org.jboss.weld.event.DeferredEventNotification$RunInRequest.run(DeferredEventNotification.java:97) [:6.0.0.Final]

      at org.jboss.weld.event.DeferredEventNotification.run(DeferredEventNotification.java:64) [:6.0.0.Final]

      at org.jboss.weld.event.TransactionSynchronizedRunnable.afterCompletion(TransactionSynchronizedRunnable.java:62) [:6.0.0.Final]

      at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.afterCompletion(SynchronizationImple.java:117) [:6.0.0.Final]

      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.afterCompletion(TwoPhaseCoordinator.java:371) [:6.0.0.Final]

      at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:104) [:6.0.0.Final]

      at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:159) [:6.0.0.Final]

      at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1158) [:6.0.0.Final]

      at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:119) [:6.0.0.Final]

      at com.arjuna.ats.jbossatx.BaseTransactionManagerDelegate.commit(BaseTransactionManagerDelegate.java:75) [:6.0.0.Final]

      at org.jboss.soa.esb.listeners.jca.EndpointProxy.endTransaction(EndpointProxy.java:401) [:]

      at org.jboss.soa.esb.listeners.jca.EndpointProxy.finish(EndpointProxy.java:295) [:]

      at org.jboss.soa.esb.listeners.jca.EndpointProxy.after(EndpointProxy.java:219) [:]

      at org.jboss.soa.esb.listeners.jca.EndpointProxy.invoke(EndpointProxy.java:146) [:]

      at $Proxy290.afterDelivery(Unknown Source)     at org.hornetq.ra.inflow.HornetQMessageHandler.onMessage(HornetQMessageHandler.java:260) [:6.0.0.Final]

      at org.hornetq.core.client.impl.ClientConsumerImpl.callOnMessage(ClientConsumerImpl.java:822) [:6.0.0.Final]

      at org.hornetq.core.client.impl.ClientConsumerImpl.access$100(ClientConsumerImpl.java:46) [:6.0.0.Final]

      at org.hornetq.core.client.impl.ClientConsumerImpl$Runner.run(ClientConsumerImpl.java:940) [:6.0.0.Final]

      at org.hornetq.utils.OrderedExecutorFactory$OrderedExecutor$1.run(OrderedExecutorFactory.java:100) [:6.0.0.Final]

      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) [:1.6.0_26]

      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) [:1.6.0_26]

      at java.lang.Thread.run(Thread.java:662) [:1.6.0_26]