[
https://issues.apache.org/jira/browse/AMQ-1617?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy Bish closed AMQ-1617.
-----------------------------
Resolution: Incomplete
No test case present and no information given on how to reproduce this.
> XA transaction fails to prepare commit
> --------------------------------------
>
> Key: AMQ-1617
> URL: https://issues.apache.org/jira/browse/AMQ-1617
> Project: ActiveMQ
> Issue Type: Bug
> Components: JCA Container
> Affects Versions: 4.1.2, 5.1.0
> Environment: Windows XP, glassfish v2 UR1
> Reporter: Kai Hudalla
> Fix For: NEEDS_REVIEWED
>
>
> I am trying to do a database update and send a message to ActiveMQ via JMS in
> a single XA transaction. When tha JTA transaction manager tries to prepare
> the commit I get the following in the ActiveMQ log and the transaction is
> rolled back.
> 2008-03-12 11:09:01,713 [/127.0.0.1:2399] DEBUG TransportConnection
> - Setting up new connection: /127.0.0.1:2399
> 2008-03-12 11:09:01,713 [/127.0.0.1:2399] DEBUG AbstractRegion
> - Adding consumer: ID:FE-Z2965-2033-1205312064755-0:30:-1:1
> 2008-03-12 11:09:01,728 [/127.0.0.1:2399] DEBUG AMQMessageStore
> - Journalled transacted message add for:
> ID:FE-Z2965-2033-1205312064755-0:30:1:1:1, at: offset = 3213, file = 1, size
> = 557, type = 1
> 2008-03-12 11:09:01,728 [/127.0.0.1:2399] DEBUG AbstractRegion
> - Removing consumer: ID:FE-Z2965-2033-1205312064755-0:30:-1:1
> 2008-03-12 11:09:01,728 [/127.0.0.1:2399] DEBUG Service
> - Error occured while processing sync command:
> java.lang.NullPointerException: Context is null
> java.lang.NullPointerException: Context is null
> at
> org.apache.activemq.broker.TransportConnection.processPrepareTransaction(TransportConnection.java:375)
> at
> org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:98)
> at
> org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:291)
> at
> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:181)
> at
> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
> at
> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:134)
> at
> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityMonitor.java:204)
> at
> org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:84)
> at
> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:196)
> at
> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:183)
> at java.lang.Thread.run(Thread.java:595)
> 2008-03-12 11:09:01,744 [/127.0.0.1:2399] DEBUG TransportConnection
> - Setting up new connection: /127.0.0.1:2399
> 2008-03-12 11:09:01,744 [/127.0.0.1:2399] DEBUG AbstractRegion
> - Adding consumer: ID:FE-Z2965-2033-1205312064755-0:30:-1:2
> 2008-03-12 11:09:01,760 [/127.0.0.1:2399] DEBUG XATransaction
> - XA Transaction rollback:
> XID:4871251:0f000000549135a246452d5a323936352c7365727665722c5033373030:46452d5a323936352c7365727665722c50333730302c01
> 2008-03-12 11:09:01,760 [/127.0.0.1:2399] DEBUG AMQMessageStore
> - Transacted message add rollback for:
> ID:FE-Z2965-2033-1205312064755-0:30:1:1:1, at: offset = 3213, file = 1, size
> = 557, type = 1
> The problem seems to be that the current connection is unregistered from the
> org.apache.activemq.broker.TransportConnectionStateRegister once the message
> is written to the journal and no new connection is registered before the
> processPrepareTransaction invocation. However, I have no idea where to look
> in the code to fix this.
> Regards,
> Kai
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira