2 Replies Latest reply on Mar 14, 2013 4:19 AM by Alexander Durnev

    "Cannot rollback() inside an XASession" error on Fuse ESB 7.1.0

    Alexander Durnev Newbie

      Yesterday I tried to migrate my bundles from ServiceMix 4.4.1 to Fuse ESB 7.1.0. Bundles with local transactions work fine, but other ones with XA transaction don't work well. They write continuously tracebacks with the following messages to the log file:

      -


       

      13:30:29,283 | WARN  | cation-stageOne] | PooledSession                    | 139 - org.apache.activemq.activemq-spring - 5.7.0.fuse-71-047 | *Caught exception trying rollback() when putting session back into the pool, will invalidate.* javax.jms.TransactionInProgressException: *Cannot rollback() inside an XASession*

      javax.jms.TransactionInProgressException: Cannot rollback() inside an XASession

              at org.apache.activemq.ActiveMQXASession.rollback(ActiveMQXASession.java:76)[279:org.apache.activemq.activemq-core:5.7.0.fuse-71-047]

              at org.apache.activemq.pool.PooledSession.close(PooledSession.java:120)[139:org.apache.activemq.activemq-spring:5.7.0.fuse-71-047]

              at org.springframework.jms.connection.JmsResourceHolder.closeAll(JmsResourceHolder.java:193)[153:org.springframework.jms:3.0.7.RELEASE]

              at org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.releaseResource(ConnectionFactoryUtils.java:412)[153:org.springframework.jms:3.0.7.RELEASE]

              at org.springframework.jms.connection.ConnectionFactoryUtils$JmsResourceSynchronization.releaseResource(ConnectionFactoryUtils.java:1)[153:org.springframework.jms:3.0.7.RELEASE]

              at org.springframework.transaction.support.ResourceHolderSynchronization.afterCompletion(ResourceHolderSynchronization.java:98)[148:org.springframework.transaction:3.0.7.RELEASE]

              at org.springframework.transaction.support.TransactionSynchronizationUtils.invokeAfterCompletion(TransactionSynchronizationUtils.java:168)[148:org.springframework.transaction:3.0.7.RELEASE]

              at org.springframework.transaction.support.AbstractPlatformTransactionManager.invokeAfterCompletion(AbstractPlatformTransactionManager.java:996)[148:org.springframework.transaction:3.0.7.RELEASE]

              at org.springframework.transaction.support.AbstractPlatformTransactionManager.triggerAfterCompletion(AbstractPlatformTransactionManager.java:971)[148:org.springframework.transaction:3.0.7.RELEASE]

              at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:799)[148:org.springframework.transaction:3.0.7.RELEASE]

              at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723)[148:org.springframework.transaction:3.0.7.RELEASE]

              at org.apache.aries.transaction.GeronimoPlatformTransactionManager.commit(GeronimoPlatformTransactionManager.java:76)

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

              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)[:1.6.0_35]

              at java.lang.reflect.Method.invoke(Method.java:597)[:1.6.0_35]

              at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:309)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.doInvoke(ServiceInvoker.java:58)[114:org.springframework.osgi.core:1.2.1]

              at org.springframework.osgi.service.importer.support.internal.aop.ServiceInvoker.invoke(ServiceInvoker.java:62)[114:org.springframework.osgi.core:1.2.1]

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invokeUnprivileged(ServiceTCCLInterceptor.java:56)[114:org.springframework.osgi.core:1.2.1]

              at org.springframework.osgi.service.util.internal.aop.ServiceTCCLInterceptor.invoke(ServiceTCCLInterceptor.java:39)[114:org.springframework.osgi.core:1.2.1]

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.osgi.service.importer.support.LocalBundleContextAdvice.invoke(LocalBundleContextAdvice.java:59)[114:org.springframework.osgi.core:1.2.1]

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.support.DelegatingIntroductionInterceptor.doProceed(DelegatingIntroductionInterceptor.java:131)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.support.DelegatingIntroductionInterceptor.invoke(DelegatingIntroductionInterceptor.java:119)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172)[110:org.springframework.aop:3.0.7.RELEASE]

              at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202)[110:org.springframework.aop:3.0.7.RELEASE]

              at $Proxy178.commit(Unknown Source)[:]

              at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:257)[153:org.springframework.jms:3.0.7.RELEASE]

              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1058)[153:org.springframework.jms:3.0.7.RELEASE]

              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1050)[153:org.springframework.jms:3.0.7.RELEASE]

              at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:947)[153:org.springframework.jms:3.0.7.RELEASE]

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

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

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

      -


       

       

      It happens with an empty queue.

       

      My activemq endpoint configuration looks as following:

      -


       

           

      -


       

       

      This endpoint is used very easy in the camel context as:

      -


       

       

      -


       

       

      I would be glad if someone can help me to solve this issue. I can provide more deatails if it necessary.