activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "James Strachan" <james.strac...@gmail.com>
Subject Re: Throwing exception during Message read fails after retry.
Date Thu, 14 Dec 2006 08:15:48 GMT
Which version are you using? Have you managed to reproduce this with 4.1?

On 12/14/06, Tim Chen <crasheddrive@gmail.com> wrote:
> The follow exception is thrown which kills the MessageListener and leave the
> bad message in the queue.
>
>     [junit] 18:22:28,437 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
> Endpoint failed to process message.
>     [junit] java.lang.RuntimeException: Endpoint after delivery notification
> failure
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.afterDelivery(
> ServerSessionImpl.java:217)
>     [junit]     at org.apache.activemq.ActiveMQSession.run(
> ActiveMQSession.java:751)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:164)
>     [junit]     at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>     [junit]     at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(
> PooledExecutor.java:748)
>     [junit]     at java.lang.Thread.run(Thread.java:595)
>     [junit] Caused by: javax.resource.ResourceException: commit failed.
>     [junit]     at org.apache.activemq.ra.LocalAndXATransaction.commit(
> LocalAndXATransaction.java:59)
>     [junit]     at org.jencks.LocalTransactionEndpoint.afterDelivery(
> LocalTransactionEndpoint.java:52)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.afterDelivery
> (MessageEndpointProxy.java:125)
>     [junit]     at org.apache.activemq.ra.MessageEndpointProxy.afterDelivery
> (MessageEndpointProxy.java:64)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.afterDelivery(
> ServerSessionImpl.java:215)
>     [junit]     ... 5 more
>     [junit] Caused by: org.apache.activemq.ConnectionClosedException: The
> connection is already closed
>     [junit]     at org.apache.activemq.ActiveMQConnection.syncSendPacket(
> ActiveMQConnection.java:1108)
>     [junit]     at org.apache.activemq.TransactionContext.commit(
> TransactionContext.java:259)
>     [junit]     at org.apache.activemq.ra.LocalAndXATransaction.commit(
> LocalAndXATransaction.java:57)
>     [junit]     ... 9 more
>     [junit] 18:22:28,440 INFO  [org.apache.activemq.ra.ServerSessionImpl:2]
> Endpoint failed to process message. Reason: java.lang.RuntimeException:
> Endpoint after delivery notification failure
>     [junit] 18:22:28,440 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
> run loop end
>     [junit] 18:22:28,440 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
> Endpoint did not release properly:
> org.apache.activemq.ra.InvalidMessageEndpointException
>     [junit] org.apache.activemq.ra.InvalidMessageEndpointException
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.release(
> MessageEndpointProxy.java:156)
>     [junit]     at org.apache.activemq.ra.MessageEndpointProxy.release(
> MessageEndpointProxy.java:68)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.close(
> ServerSessionImpl.java:252)
>     [junit]     at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(
> ServerSessionPoolImpl.java:180)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:178)
>     [junit]     at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>     [junit]     at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(
> PooledExecutor.java:748)
>     [junit]     at java.lang.Thread.run(Thread.java:595)
>     [junit] 18:22:28,441 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
> Run finished
>     [junit] 18:22:28,441 DEBUG [org.apache.activemq.ra.ServerSessionImpl:2]
> Work completed: javax.resource.spi.work.WorkEvent[source=Work
> :ServerSessionImpl:2]
>     [junit] 18:22:28,396 WARN  [org.jencks.LocalTransactionEndpoint] Failed
> to rollback local transaction: javax.resource.ResourceException: rollback
> failed.
>     [junit] javax.resource.ResourceException: rollback failed.
>     [junit]     at org.apache.activemq.ra.LocalAndXATransaction.rollback(
> LocalAndXATransaction.java:73)
>     [junit]     at org.jencks.LocalTransactionEndpoint.release(
> LocalTransactionEndpoint.java:58)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.enter(
> MessageEndpointProxy.java:140)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointState.transition(
> MessageEndpointProxy.java:98)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.beforeDelivery
> (MessageEndpointProxy.java:114)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy.beforeDelivery(
> MessageEndpointProxy.java:56)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.beforeDelivery(
> ServerSessionImpl.java:200)
>     [junit]     at org.apache.activemq.ActiveMQSession.run(
> ActiveMQSession.java:686)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:164)
>     [junit]     at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>     [junit]     at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(
> PooledExecutor.java:743)
>     [junit]     at java.lang.Thread.run(Thread.java:595)
>     [junit] Caused by: org.apache.activemq.ConnectionClosedException: The
> connection is already closed
>     [junit]     at org.apache.activemq.ActiveMQConnection.asyncSendPacket(
> ActiveMQConnection.java:1088)
>     [junit]     at org.apache.activemq.TransactionContext.rollback(
> TransactionContext.java:225)
>     [junit]     at org.apache.activemq.ra.LocalAndXATransaction.rollback(
> LocalAndXATransaction.java:71)
>     [junit]     ... 11 more
>     [junit] 18:22:28,441 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1]
> Endpoint failed to process message.
>     [junit] java.lang.RuntimeException: Endpoint before delivery
> notification failure
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.beforeDelivery(
> ServerSessionImpl.java:202)
>     [junit]     at org.apache.activemq.ActiveMQSession.run(
> ActiveMQSession.java:686)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:164)
>     [junit]     at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>     [junit]     at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(
> PooledExecutor.java:743)
>     [junit]     at java.lang.Thread.run(Thread.java:595)
>     [junit] Caused by: javax.resource.ResourceException: begin failed.
>     [junit]     at org.apache.activemq.ra.LocalAndXATransaction.begin(
> LocalAndXATransaction.java:51)
>     [junit]     at org.jencks.LocalTransactionEndpoint.beforeDelivery(
> LocalTransactionEndpoint.java:48)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointAlive.beforeDelivery
> (MessageEndpointProxy.java:109)
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy.beforeDelivery(
> MessageEndpointProxy.java:56)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.beforeDelivery(
> ServerSessionImpl.java:200)
>     [junit]     ... 5 more
>     [junit] Caused by: javax.jms.JMSException: Transport disposed.
>     [junit]     at org.apache.activemq.util.JMSExceptionSupport.create(
> JMSExceptionSupport.java:57)
>     [junit]     at org.apache.activemq.ActiveMQConnection.asyncSendPacket(
> ActiveMQConnection.java:1094)
>     [junit]     at org.apache.activemq.TransactionContext.begin(
> TransactionContext.java:199)
>     [junit]     at org.apache.activemq.ra.LocalAndXATransaction.begin(
> LocalAndXATransaction.java:48)
>     [junit]     ... 9 more
>     [junit] Caused by: java.io.IOException: Transport disposed.
>     [junit]     at org.apache.activemq.transport.vm.VMTransport.oneway(
> VMTransport.java:69)
>     [junit]     at org.apache.activemq.transport.MutexTransport.oneway(
> MutexTransport.java:44)
>     [junit]     at org.apache.activemq.transport.ResponseCorrelator.oneway(
> ResponseCorrelator.java:60)
>     [junit]     at org.apache.activemq.ActiveMQConnection.asyncSendPacket(
> ActiveMQConnection.java:1092)
>     [junit]     ... 11 more
>     [junit] 18:22:28,525 INFO  [org.apache.activemq.ra.ServerSessionImpl:1]
> Endpoint failed to process message. Reason: java.lang.RuntimeException:
> Endpoint before delivery notification failure
>     [junit] 18:22:28,525 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1]
> run loop end
>     [junit] 18:22:28,525 DEBUG [org.apache.activemq.ra.ServerSessionImpl:1]
> Endpoint did not release properly:
> org.apache.activemq.ra.InvalidMessageEndpointException
>     [junit] org.apache.activemq.ra.InvalidMessageEndpointException
>     [junit]     at
> org.apache.activemq.ra.MessageEndpointProxy$MessageEndpointDead.release(
> MessageEndpointProxy.java:156)
>     [junit]     at org.apache.activemq.ra.MessageEndpointProxy.release(
> MessageEndpointProxy.java:68)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.close(
> ServerSessionImpl.java:252)
>     [junit]     at
> org.apache.activemq.ra.ServerSessionPoolImpl.removeFromPool(
> ServerSessionPoolImpl.java:180)
>     [junit]     at org.apache.activemq.ra.ServerSessionImpl.run(
> ServerSessionImpl.java:178)
>     [junit]     at org.apache.geronimo.connector.work.WorkerContext.run(
> WorkerContext.java:291)
>     [junit]     at
> EDU.oswego.cs.dl.util.concurrent.PooledExecutor$Worker.run(
> PooledExecutor.java:743)
>     [junit]     at java.lang.Thread.run(Thread.java:595)
>
> Setup is ActiveMQ 4.1-SNAPSHOT/Jencks 1.3/Spring 2.0.1
>
>    <bean id="retryConnector" class="org.jencks.JCAConnector">
>       <property name="jcaContainer" ref="jcaContainer"/>
>       <property name="activationSpec">
>          <bean class="org.apache.activemq.ra.ActiveMQActivationSpec">
>             <property name="activeMQDestination" ref="asyncQueue"/>
>          </bean>
>       </property>
>       <!-- property name="transactionManager" ref="txManager"/ -->
>       <property name="ref" value="rollbackCommandProcessor"/>
>    </bean>
>
>    <bean id="jmsResourceAdapter" class="
> org.apache.activemq.ra.ActiveMQResourceAdapter">
>       <property name="initialRedeliveryDelay" value="500"/>
>       <property name="maximumRedeliveries" value="2"/>
>       <property name="connectionFactory" ref="jmsConnectionFactory"/>
>    </bean>
>
>    <bean id="jcaContainer" class="org.jencks.JCAContainer">
>       <property name="bootstrapContext">
>          <bean class="org.jencks.factory.BootstrapContextFactoryBean">
>             <property name="threadPoolSize" value="25"/>
>          </bean>
>       </property>
>       <property name="resourceAdapter" ref="jmsResourceAdapter"/>
>    </bean>
>
> Strangely enough if you put the transactionManager back in it doesn't have
> the error but it doesn't seem to send to the DLQ.
> It ignores the maximumRedeliveries option as well.
> I could set it to 1 and see multiple consumer retries.
>
> Is this a bug with 4.1-SNAPSHOT and/or Jencks or is this a configuration
> issue?
>
>


-- 

James
-------
http://radio.weblogs.com/0112098/

Mime
View raw message