Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-6707

JDBC XA: Could not remove prepared transaction state from message

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Critical
    • Resolution: Fixed
    • 5.14.5
    • 5.16.0
    • JDBC, XA
    • None

    Description

      When ActiveMQ 5.14.5 is configured with jdbc persistence storage (postgres) from time to time below error occurs:

      2017-06-15 01:41:37,418 | ERROR | enerContainer-21 | CommitTask                       | 67 - org.apache.aries.transaction.manager - 1.3.1 | Unexpected exception committing org.apache.geronimo.transaction.manager.WrapperNamedXAResource@34ac9d62; continuing to commit other RMs
      javax.transaction.xa.XAException: STORE COMMIT FAILED: Transaction rolled back xaErrorCode:104
      	at org.apache.activemq.TransactionContext.toXAException(TransactionContext.java:793)
      	at org.apache.activemq.TransactionContext.commit(TransactionContext.java:622)
      	at org.apache.geronimo.transaction.manager.WrapperNamedXAResource.commit(WrapperNamedXAResource.java:54)
      	at org.apache.geronimo.transaction.manager.CommitTask.run(CommitTask.java:64)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commitResources(TransactionImpl.java:688)
      	at org.apache.geronimo.transaction.manager.TransactionImpl.commit(TransactionImpl.java:327)
      	at org.apache.geronimo.transaction.manager.TransactionManagerImpl.commit(TransactionManagerImpl.java:252)
      	at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1020)
      	at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:761)
      	at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:730)
      	at org.apache.aries.transaction.internal.AriesPlatformTransactionManager.commit(AriesPlatformTransactionManager.java:75)
      	at sun.reflect.GeneratedMethodAccessor180.invoke(Unknown Source)
      	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)[:1.8.0_131]
      	at java.lang.reflect.Method.invoke(Method.java:498)[:1.8.0_131]
      	at com.ectsp.spring.osgi.PlatformTransactionManagerFactoryBean$ProxyTxManagerHandler.invoke(PlatformTransactionManagerFactoryBean.java:115)[169:ectsp-spring-osgi:1.0.0.SNAPSHOT]
      	at com.sun.proxy.$Proxy68.commit(Unknown Source)[100:org.apache.servicemix.bundles.spring-tx:4.2.8.RELEASE_1]
      	at org.springframework.jms.listener.AbstractPollingMessageListenerContainer.receiveAndExecute(AbstractPollingMessageListenerContainer.java:245)[97:org.apache.servicemix.bundles.spring-jms:4.2.8.RELEASE_1]
      	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:1164)[97:org.apache.servicemix.bundles.spring-jms:4.2.8.RELEASE_1]
      	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.executeOngoingLoop(DefaultMessageListenerContainer.java:1156)[97:org.apache.servicemix.bundles.spring-jms:4.2.8.RELEASE_1]
      	at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:1053)[97:org.apache.servicemix.bundles.spring-jms:4.2.8.RELEASE_1]
      	at java.lang.Thread.run(Thread.java:748)[:1.8.0_131]
      Caused by: javax.transaction.xa.XAException: STORE COMMIT FAILED: Transaction rolled back xaErrorCode:104
      	at org.apache.activemq.transaction.Transaction.newXAException(Transaction.java:212)
      	at org.apache.activemq.transaction.XATransaction.storeCommit(XATransaction.java:93)
      	at org.apache.activemq.transaction.XATransaction.commit(XATransaction.java:76)
      	at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:252)
      	at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:118)
      	at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:118)
      	at org.apache.activemq.broker.TransportConnection.processCommitTransactionTwoPhase(TransportConnection.java:547)
      	at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:102)
      	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:336)
      	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:200)
      	at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50)
      	at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:125)
      	at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:301)
      	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
      	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:233)[47:org.apache.activemq.activemq-osgi:5.14.5]
      	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:215)[47:org.apache.activemq.activemq-osgi:5.14.5]
      	at java.lang.Thread.run(Thread.java:745)[:1.8.0_131]
      Caused by: java.io.IOException: Could not remove prepared transaction state from message add for sequenceId: 4025171
      	at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doCommitAddOp(DefaultJDBCAdapter.java:1031)
      	at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitAdd(JDBCPersistenceAdapter.java:780)
      	at org.apache.activemq.store.jdbc.JdbcMemoryTransactionStore$CommitAddOutcome.run(JdbcMemoryTransactionStore.java:146)
      	at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:101)
      	at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:270)
      	at org.apache.activemq.transaction.XATransaction.storeCommit(XATransaction.java:86)
      	... 15 more
      

      It seams that it the same issue as in https://issues.apache.org/jira/browse/AMQ-5567.

      Attachments

        Activity

          People

            gtully Gary Tully
            ragnor84 Jakub
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: