You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@activemq.apache.org by "Gary Tully (JIRA)" <ji...@apache.org> on 2013/07/30 22:25:48 UTC

[jira] [Resolved] (AMQ-4643) JDBCPersistence DB stopped during message send with JDBCIOExceptionHandler configured; IOException/SQLException is sent back (sometimes) to the client before the transport connector is shutdown

     [ https://issues.apache.org/jira/browse/AMQ-4643?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Gary Tully resolved AMQ-4643.
-----------------------------

       Resolution: Fixed
    Fix Version/s: 5.9.0
         Assignee: Gary Tully

fix in http://svn.apache.org/viewvc?view=revision&revision=r1508602

thanks for the test.
The ft/JDBCRestart* tests had workarounds for the non deterministic behaviour that are now removed.
                
> JDBCPersistence DB stopped during message send with JDBCIOExceptionHandler configured; IOException/SQLException is sent back (sometimes) to the client before the transport connector is shutdown
> -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
>
>                 Key: AMQ-4643
>                 URL: https://issues.apache.org/jira/browse/AMQ-4643
>             Project: ActiveMQ
>          Issue Type: Bug
>    Affects Versions: 5.8.0
>         Environment: - tested on trunk
>            Reporter: Pat Fox
>            Assignee: Gary Tully
>             Fix For: 5.9.0
>
>         Attachments: AMQ4643Test.java
>
>
> This related to AMQ-4636 JIRA for gtully's second point in comment https://issues.apache.org/jira/browse/AMQ-4636?focusedCommentId=13712196&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13712196
> Scenario:
> - Producer sending persistent message (no transaction)
> - JDBCIOExceptionHandler is configured 
> - the underlying DB is shutdown during message send
> Result:
> One of two outcomes can happen:
> 1) the broker sends the an IOException/SQLException wrapped in a JMSException (below) back to the client and then shuts down the transport connectors.
> 2) the broker shuts down the transport connector when the IOException/SQLException is encountered.
> Expected behavior:
> As the JDBCIOHandler is configured which is handling the SQL exception, it would be good if the transport connectors were shutdown and no IOException/SQLException is reported to producer.
> {code}
> 2013-07-19 15:22:05,436 [main           ] - ERROR pDBDuringProducerSendTopicTest - unexpected exception caught
> javax.jms.JMSException: Database &apos;target/derbydb_15&apos; not found.
> 	at org.apache.activemq.util.JMSExceptionSupport.create(JMSExceptionSupport.java:54)
> 	at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1391)
> 	at org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnection.java:1319)
> 	at org.apache.activemq.ActiveMQSession.send(ActiveMQSession.java:1809)
> 	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:289)
> 	at org.apache.activemq.ActiveMQMessageProducer.send(ActiveMQMessageProducer.java:224)
> 	at org.apache.activemq.ActiveMQMessageProducerSupport.send(ActiveMQMessageProducerSupport.java:241)
> 	at org.apache.activemq.store.jdbc.StopDBDuringProducerSendTopicTest.sendMessage(StopDBDuringProducerSendTopicTest.java:150)
> 	at org.apache.activemq.store.jdbc.StopDBDuringProducerSendTopicTest.testProducerWithDBShutdown(StopDBDuringProducerSendTopicTest.java:127)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at junit.framework.TestCase.runTest(TestCase.java:176)
> 	at junit.framework.TestCase.runBare(TestCase.java:141)
> 	at junit.framework.TestResult$1.protect(TestResult.java:122)
> 	at junit.framework.TestResult.runProtected(TestResult.java:142)
> 	at junit.framework.TestResult.run(TestResult.java:125)
> 	at junit.framework.TestCase.run(TestCase.java:129)
> 	at junit.framework.TestSuite.runTest(TestSuite.java:255)
> 	at junit.framework.TestSuite.run(TestSuite.java:250)
> 	at org.junit.internal.runners.JUnit38ClassRunner.run(JUnit38ClassRunner.java:84)
> 	at org.apache.maven.surefire.junit4.JUnit4TestSet.execute(JUnit4TestSet.java:53)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.executeTestSet(JUnit4Provider.java:123)
> 	at org.apache.maven.surefire.junit4.JUnit4Provider.invoke(JUnit4Provider.java:104)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
> 	at java.lang.reflect.Method.invoke(Method.java:597)
> 	at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
> 	at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
> 	at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:175)
> 	at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:81)
> 	at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:68)
> Caused by: java.io.IOException: Database &apos;target/derbydb_15&apos; not found.
> 	at org.apache.activemq.util.IOExceptionSupport.create(IOExceptionSupport.java:45)
> 	at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:68)
> 	at org.apache.activemq.store.jdbc.adapter.DefaultJDBCAdapter.doAddMessage(DefaultJDBCAdapter.java:218)
> 	at org.apache.activemq.store.jdbc.JDBCMessageStore.addMessage(JDBCMessageStore.java:123)
> 	at org.apache.activemq.store.memory.MemoryTransactionStore.addMessage(MemoryTransactionStore.java:327)
> 	at org.apache.activemq.store.memory.MemoryTransactionStore$2.asyncAddTopicMessage(MemoryTransactionStore.java:190)
> 	at org.apache.activemq.broker.region.Topic.doMessageSend(Topic.java:482)
> 	at org.apache.activemq.broker.region.Topic.send(Topic.java:446)
> 	at org.apache.activemq.broker.region.AbstractRegion.send(AbstractRegion.java:406)
> 	at org.apache.activemq.broker.region.RegionBroker.send(RegionBroker.java:431)
> 	at org.apache.activemq.broker.BrokerFilter.send(BrokerFilter.java:147)
> 	at org.apache.activemq.broker.CompositeDestinationBroker.send(CompositeDestinationBroker.java:96)
> 	at org.apache.activemq.broker.TransactionBroker.send(TransactionBroker.java:317)
> 	at org.apache.activemq.broker.MutableBrokerFilter.send(MutableBrokerFilter.java:152)
> 	at org.apache.activemq.broker.TransportConnection.processMessage(TransportConnection.java:464)
> 	at org.apache.activemq.command.ActiveMQMessage.visit(ActiveMQMessage.java:751)
> 	at org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:294)
> 	at org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:149)
> 	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:288)
> 	at org.apache.activemq.transport.TransportSupport.doConsume(TransportSupport.java:83)
> 	at org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.java:214)
> 	at org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:196)
> 	at java.lang.Thread.run(Thread.java:680)
> Caused by: java.sql.SQLException: Database &apos;target/derbydb_15&apos; not found.
> 	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.generateCsSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.newSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.handleDBNotFound(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection.&lt;init&gt;(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection30.&lt;init&gt;(Unknown Source)
> 	at org.apache.derby.impl.jdbc.EmbedConnection40.&lt;init&gt;(Unknown Source)
> 	at org.apache.derby.jdbc.Driver40.getNewEmbedConnection(Unknown Source)
> 	at org.apache.derby.jdbc.InternalDriver.connect(Unknown Source)
> 	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
> 	at org.apache.derby.jdbc.EmbeddedDataSource.getConnection(Unknown Source)
> 	at org.apache.activemq.store.jdbc.StopDBDuringProducerSendTopicTest$ReconnectingEmbeddedDataSource.getConnection(StopDBDuringProducerSendTopicTest.java:242)
> 	at org.apache.activemq.store.jdbc.TransactionContext.getConnection(TransactionContext.java:58)
> 	... 23 more
> Caused by: java.lang.Throwable: org.apache.derby.impl.jdbc.EmbedSQLException: Database &apos;target/derbydb_15&apos; not found.
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory.getSQLException(Unknown Source)
> 	at org.apache.derby.impl.jdbc.SQLExceptionFactory40.wrapArgsForTransportAcrossDRDA(Unknown Source)
> 	... 38 more
> {code}

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira