Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
5.6.0
-
None
-
None
Description
org.apache.activemq.broker.ft.DbRestartJDBCQueueMasterSlaveTest.testSendReceive intermittent failure shows odd exceptions on occasion. This points to the need to revisit to cleanup this code path. Stack trace below
2012-09-05 00:47:45,110 [0.1:42083@62001] - WARN LocalTransaction - Store COMMIT FAILED: java.io.IOException: No current connection. at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:45) at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:138) at org.apache.activemq.store.jdbc.TransactionContext.commit(TransactionContext.java:178) at org.apache.activemq.store.jdbc.JDBCPersistenceAdapter.commitTransaction(JDBCPersistenceAdapter.java:544) at org.apache.activemq.store.memory.MemoryTransactionStore$Tx.commit(MemoryTransactionStore.java:111) at org.apache.activemq.store.memory.MemoryTransactionStore.commit(MemoryTransactionStore.java:260) at org.apache.activemq.transaction.LocalTransaction.commit(LocalTransaction.java:72) at org.apache.activemq.broker.TransactionBroker.commitTransaction(TransactionBroker.java:263) at org.apache.activemq.broker.MutableBrokerFilter.commitTransaction(MutableBrokerFilter.java:103) at org.apache.activemq.broker.TransportConnection.processCommitTransactionOnePhase(TransportConnection.java:410) at org.apache.activemq.command.TransactionInfo.visit(TransactionInfo.java:100) at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:292) at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:150) at org.apache.activemq.transport.MutexTransport.onCommand(MutexTransport.java:50) at org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireFormatNegotiator.java:113) at org.apache.activemq.transport.AbstractInactivityMonitor.onCommand(AbstractInactivityMonitor.java:229) at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83) at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:222) at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:204) at java.lang.Thread.run(Thread.java:662) Caused by: java.sql.SQLNonTransientConnectionException: No current connection. at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.newEmbedSQLException(Unknown Source) at org.apache.derby.impl.jdbc.Util.noCurrentConnection(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.checkIfClosed(Unknown Source) at org.apache.derby.impl.jdbc.EmbedConnection.getAutoCommit(Unknown Source) at org.apache.activemq.store.jdbc.TransactionContext.close(TransactionContext.java:131) ... 18 more Caused by: java.sql.SQLException: No current connection. at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source) at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source) ... 25 more
see: org.apache.activemq.store.jdbc.TransactionContext#close
{code}} finally {
if (connection != null && !connection.getAutoCommit())
}
why the state check on getAutoCommit? This state is explicitly set by the context so it should always be known.