ActiveMQ
  1. ActiveMQ
  2. AMQ-152

activemq / jboss connector - transactions fail

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 1.2, 1.3, 1.4
    • Fix Version/s: 1.4
    • Component/s: Connector
    • Labels:
      None
    • Environment:

      JBoss 4.0.1RC1 / different version of ActiveMQ (1.2, 1.3, SNAPSHOT 1.4) / activeMQ connector / on windows JDK 1.4.2_05

      Description

      Test :
      running the MDB tests (activemq-jboss-test / panacya-mdb-test-1.0.jar) described at http://docs.codehaus.org/display/ACTIVEMQ/JBoss+Integration

      1) launching
      maven sendt (send on a topic)

      => seems to work fine at the first call (at least no exception, but a strange message on Jboss) :
      14:40:22,265 WARN [ServerSessionImpl] Local transaction had not been commited. Commiting now.

      2) lauching a second time throws an exception (see stack trace)
      This problem occurs sometimes on the simple test queue too,(not in activeMQ 1.4) when launching many time maven sendq. It seems related to transaction. It occurs on all version 1.2, 1.3, 1.4 snapshot)

      Here is the complete trace on Jboss :

      14:46:41,187 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.SimpleM
      essageReceiverBean
      14:46:41,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.setMess
      ageDrivenContext
      14:46:41,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.ejbCrea
      te
      14:46:41,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.onMessa
      ge
      14:46:41,203 INFO [SimpleMessageReceiverBean] Message received: hello ActiveMQ
      world
      14:46:41,203 INFO [SenderClient] Looking up Sender: java:comp/env/ejb/Sender
      14:46:41,234 INFO [SenderClient] Sending message: hello ActiveMQ world
      14:46:41,375 INFO [SenderClient] Message sent
      14:46:41,375 INFO [SimpleMessageReceiverBean] Begin delay...
      14:46:46,375 INFO [SimpleMessageReceiverBean] ...end delay
      >> THE STRANGE MESSAGE...
      14:46:46,375 WARN [ServerSessionImpl] Local transaction had not been commited.
      Commiting now.
      14:47:03,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.SimpleM
      essageReceiverBean
      14:47:03,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.setMess
      ageDrivenContext
      14:47:03,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.ejbCrea
      te
      14:47:03,203 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.onMessa
      ge
      14:47:03,203 INFO [SimpleMessageReceiverBean] Message received: hello ActiveMQ
      world
      14:47:03,203 INFO [SenderClient] Looking up Sender: java:comp/env/ejb/Sender
      14:47:03,203 INFO [SenderClient] Sending message: hello ActiveMQ world
      14:47:03,250 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.onMessa
      ge
      14:47:03,250 INFO [SimpleMessageReceiverBean] Message received: hello ActiveMQ
      world
      14:47:03,250 INFO [SenderClient] Looking up Sender: java:comp/env/ejb/Sender
      14:47:03,250 INFO [SenderClient] Sending message: hello ActiveMQ world
      14:47:03,265 INFO [SenderClient] Message sent
      14:47:03,265 INFO [SimpleMessageReceiverBean] Begin delay...
      14:47:03,296 INFO [SenderClient] Message sent
      14:47:03,296 INFO [SimpleMessageReceiverBean] Begin delay...
      14:47:08,265 INFO [SimpleMessageReceiverBean] ...end delay
      14:47:08,296 INFO [SimpleMessageReceiverBean] ...end delay
      14:47:08,296 INFO [SimpleMessageReceiverBean] SimpleMessageReceiverBean.ejbRemo
      ve

      >> THE EXCEPTION (RELATED TO TRANSACTION MANAGEMENT?)

      14:47:08,296 ERROR [LogInterceptor] RuntimeException in method: public abstract
      void javax.jms.MessageListener.onMessage(javax.jms.Message):
      java.lang.IllegalStateException: setRollbackOnly must only be called in the cont
      ext of a transaction (EJB 2.0 - 15.5.1)
      at org.jboss.ejb.MessageDrivenEnterpriseContext$MessageDrivenContextImpl
      .setRollbackOnly(MessageDrivenEnterpriseContext.java:208)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.rollba
      ck(SimpleMessageReceiverBean.java:105)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.send(S
      impleMessageReceiverBean.java:98)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.handle
      Message(SimpleMessageReceiverBean.java:67)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.onMess
      age(SimpleMessageReceiverBean.java:47)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
      ageDrivenContainer.java:475)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
      ke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
      DrivenInstanceInterceptor.java:87)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
      Interceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
      rceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
      torCMT.java:280)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
      46)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
      terceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
      ainer.java:389)
      at org.jboss.ejb.Container.invoke(Container.java:856)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(Loca
      lInvoker.java:155)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)

      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
      a:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
      java:46)
      at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(Mess
      ageEndpointInterceptor.java:237)
      at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(Messag
      eEndpointInterceptor.java:117)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodIntercepto
      r.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy58.onMessage(Unknown Source)
      at org.codehaus.activemq.ActiveMQSession.run(ActiveMQSession.java:558)
      at org.codehaus.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
      :137)
      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:200)
      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:
      232)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
      utor.java:743)
      at java.lang.Thread.run(Thread.java:534)
      14:47:08,296 INFO [ActiveMQSession] Caught :javax.ejb.EJBException: RuntimeExce
      ption; CausedByException is:
      setRollbackOnly must only be called in the context of a transaction (EJB
      2.0 - 15.5.1)
      javax.ejb.EJBException: RuntimeException; CausedByException is:
      setRollbackOnly must only be called in the context of a transaction (EJB
      2.0 - 15.5.1)
      at org.jboss.ejb.plugins.LogInterceptor.handleException(LogInterceptor.j
      ava:381)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:195)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
      ainer.java:389)
      at org.jboss.ejb.Container.invoke(Container.java:856)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(Loca
      lInvoker.java:155)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)

      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
      a:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
      java:46)
      at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(Mess
      ageEndpointInterceptor.java:237)
      at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(Messag
      eEndpointInterceptor.java:117)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodIntercepto
      r.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy58.onMessage(Unknown Source)
      at org.codehaus.activemq.ActiveMQSession.run(ActiveMQSession.java:558)
      at org.codehaus.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
      :137)
      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:200)
      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:
      232)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
      utor.java:743)
      at java.lang.Thread.run(Thread.java:534)
      java.lang.IllegalStateException: setRollbackOnly must only be called in the cont
      ext of a transaction (EJB 2.0 - 15.5.1)
      at org.jboss.ejb.MessageDrivenEnterpriseContext$MessageDrivenContextImpl
      .setRollbackOnly(MessageDrivenEnterpriseContext.java:208)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.rollba
      ck(SimpleMessageReceiverBean.java:105)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.send(S
      impleMessageReceiverBean.java:98)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.handle
      Message(SimpleMessageReceiverBean.java:67)
      at com.panacya.platform.service.bus.mdb.SimpleMessageReceiverBean.onMess
      age(SimpleMessageReceiverBean.java:47)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
      at org.jboss.ejb.MessageDrivenContainer$ContainerInterceptor.invoke(Mess
      ageDrivenContainer.java:475)
      at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invo
      ke(CachedConnectionInterceptor.java:185)
      at org.jboss.ejb.plugins.MessageDrivenInstanceInterceptor.invoke(Message
      DrivenInstanceInterceptor.java:87)
      at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidation
      Interceptor.java:48)
      at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInte
      rceptor.java:105)
      at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxIntercep
      torCMT.java:280)
      at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:1
      46)
      at org.jboss.ejb.plugins.RunAsSecurityInterceptor.invoke(RunAsSecurityIn
      terceptor.java:94)
      at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:191)
      at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFacto
      ryFinderInterceptor.java:122)
      at org.jboss.ejb.MessageDrivenContainer.internalInvoke(MessageDrivenCont
      ainer.java:389)
      at org.jboss.ejb.Container.invoke(Container.java:856)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.
      java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAcces
      sorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:324)
      at org.jboss.mx.interceptor.ReflectedDispatcher.invoke(ReflectedDispatch
      er.java:144)
      at org.jboss.mx.server.Invocation.dispatch(Invocation.java:80)
      at org.jboss.mx.server.Invocation.invoke(Invocation.java:72)
      at org.jboss.mx.server.AbstractMBeanInvoker.invoke(AbstractMBeanInvoker.
      java:249)
      at org.jboss.mx.server.MBeanServerImpl.invoke(MBeanServerImpl.java:642)
      at org.jboss.invocation.local.LocalInvoker$MBeanServerAction.invoke(Loca
      lInvoker.java:155)
      at org.jboss.invocation.local.LocalInvoker.invoke(LocalInvoker.java:104)

      at org.jboss.invocation.InvokerInterceptor.invoke(InvokerInterceptor.jav
      a:90)
      at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.
      java:46)
      at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.delivery(Mess
      ageEndpointInterceptor.java:237)
      at org.jboss.ejb.plugins.inflow.MessageEndpointInterceptor.invoke(Messag
      eEndpointInterceptor.java:117)
      at org.jboss.proxy.ClientMethodInterceptor.invoke(ClientMethodIntercepto
      r.java:59)
      at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:86)
      at $Proxy58.onMessage(Unknown Source)
      at org.codehaus.activemq.ActiveMQSession.run(ActiveMQSession.java:558)
      at org.codehaus.activemq.ra.ServerSessionImpl.run(ServerSessionImpl.java
      :137)
      at org.jboss.resource.work.WorkWrapper.execute(WorkWrapper.java:200)
      at org.jboss.util.threadpool.BasicTaskWrapper.run(BasicTaskWrapper.java:
      232)
      at EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(PooledExec
      utor.java:743)
      at java.lang.Thread.run(Thread.java:534)
      14:47:08,343 WARN [ServerSessionImpl] Local transaction had not been commited.
      Commiting now.

        Activity

          People

          • Assignee:
            Michael Gaffney
            Reporter:
            thierry sorgnard
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved:

              Development