activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sbuster <stevebuster...@hotmail.com>
Subject Re: javax.jms.JMSException: Transaction 'TX:ID...' not started
Date Thu, 13 May 2010 12:15:33 GMT

Gary,
Thanks for the response!  I downloaded the JmsRollbackRedeliveryTest and get
the same results, plus once a few test cases execute it hangs.  BTW, none of
hte test cases are successful.  here is the output.

May 13, 2010 7:12:39 AM org.apache.activemq.JmsRollbackRedeliveryTest
doTestRedelivery
INFO: Rollback message <hello id='1'/> id:
ID:C001318805-3451-1273691609685-2:0:2:1:1
May 13, 2010 7:12:39 AM org.apache.activemq.broker.TransportConnection
serviceException
SEVERE: Async error occurred: javax.jms.JMSException: Transaction
'TX:ID:C001318805-1158-1273752758843-2:0:1' has not been started.
javax.jms.JMSException: Transaction
'TX:ID:C001318805-1158-1273752758843-2:0:1' has not been started.
	at
org.apache.activemq.broker.TransactionBroker.getTransaction(TransactionBroker.java:270)
	at
org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionBroker.java:190)
	at
org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
	at
org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java:74)
	at
org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBrokerFilter.java:85)
	at
org.apache.activemq.broker.TransportConnection.processMessageAck(TransportConnection.java:456)
	at org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
	at
org.apache.activemq.broker.TransportConnection.service(TransportConnection.java:305)
	at
org.apache.activemq.broker.TransportConnection$1.onCommand(TransportConnection.java:179)
	at
org.apache.activemq.transport.ResponseCorrelator.onCommand(ResponseCorrelator.java:104)
	at
org.apache.activemq.transport.TransportFilter.onCommand(TransportFilter.java:68)
	at
org.apache.activemq.transport.vm.VMTransport.iterate(VMTransport.java:205)
	at
org.apache.activemq.thread.PooledTaskRunner.runTask(PooledTaskRunner.java:122)
	at
org.apache.activemq.thread.PooledTaskRunner$1.run(PooledTaskRunner.java:43)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Unknown Source)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
May 13, 2010 7:12:39 AM org.apache.activemq.JmsRollbackRedeliveryTest
doTestRedelivery
INFO: Received message <hello id='1'/>
(0)ID:C001318805-3451-1273691609685-2:0:2:1:1



Gary Tully wrote:
> 
> It will only get to the dlq when the redelivery policy retries are
> exceeded
> and this defaults to 6. You would need to configure that to 0 to get it
> sent
> to get a delivery to the DLQ.
> 
> Can you try and produce a tests case for this behavior where the ack is
> unexpected.
> Pulling your code into the JMSConsumerTest does not reproduce. It works as
> expected.
> Maybe the JmsRollbackRedeliveryTest can give u a good starting point for a
> test case or some examples that work:
> 
> http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/test/java/org/apache/activemq/
> 
> On 11 May 2010 20:36, sbuster <stevebuster911@hotmail.com> wrote:
> 
>>
>> I'm the same probelm as the other user in terms of using a simple
>> transacted
>> client that tries to call session.rollback and get the following
>> exception
>> in the log.  Ultimately I want the message to end up in the DLQ but it
>> never
>> gets directed there.  attached is a simple client, my activemq config.
>>
>> ActiveMQ 5.3.1 & 5.3.2
>> Using the default activemq.xml configuration file.
>>
>> Test Case
>> public class MessageConsumerA {
>>        private String url = ActiveMQConnection.DEFAULT_BROKER_URL;
>>        private Session session;
>>    private Destination destination;
>>    private int ackMode = Session.AUTO_ACKNOWLEDGE;
>>    private boolean transacted=true;
>>    private String subject = "TOOL.DEFAULT";
>>    javax.jms.MessageConsumer consumer = null;
>>        /**
>>         * @param args
>>         * @throws Exception
>>         */
>>        public static void main(String[] args) throws Exception {
>>                MessageConsumerA mc = new MessageConsumerA();
>>                mc.run();
>>
>>        }
>>
>>        public void run() throws Exception{
>>                ActiveMQConnectionFactory connectionFactory = new
>> ActiveMQConnectionFactory(url);
>>        Connection connection = connectionFactory.createConnection();
>>        connection.start();
>>        session = connection.createSession(transacted, ackMode);
>>        destination = session.createQueue(subject);
>>        consumer = session.createConsumer(destination);
>>        Message message = consumer.receive(10000);
>>        session.rollback();
>>        System.out.println("Closing connection");
>>        consumer.close();
>>        session.close();
>>        connection.close();
>>        }
>>
>> }
>>
>>
>> Stack Trace:
>>  WARN | Async error occurred: javax.jms.JMSException: Transaction
>> 'TX:ID:C001318
>> 805-4042-1273606494194-0:0:1' has not been started.
>> javax.jms.JMSException: Transaction
>> 'TX:ID:C001318805-4042-1273606494194-0:0:1'
>> has not been started.
>>        at
>> org.apache.activemq.broker.TransactionBroker.getTransaction(Transacti
>> onBroker.java:270)
>>        at
>> org.apache.activemq.broker.TransactionBroker.acknowledge(TransactionB
>> roker.java:190)
>>        at
>> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java
>> :74)
>>        at
>> org.apache.activemq.broker.BrokerFilter.acknowledge(BrokerFilter.java
>> :74)
>>        at
>> org.apache.activemq.broker.MutableBrokerFilter.acknowledge(MutableBro
>> kerFilter.java:85)
>>        at
>> org.apache.activemq.broker.TransportConnection.processMessageAck(Tran
>> sportConnection.java:452)
>>        at
>> org.apache.activemq.command.MessageAck.visit(MessageAck.java:205)
>>        at
>> org.apache.activemq.broker.TransportConnection.service(TransportConne
>> ction.java:300)
>>        at
>> org.apache.activemq.broker.TransportConnection$1.onCommand(TransportC
>> onnection.java:178)
>>        at
>> org.apache.activemq.transport.TransportFilter.onCommand(TransportFilt
>> er.java:68)
>>        at
>> org.apache.activemq.transport.WireFormatNegotiator.onCommand(WireForm
>> atNegotiator.java:113)
>>        at
>> org.apache.activemq.transport.InactivityMonitor.onCommand(InactivityM
>> onitor.java:216)
>>        at
>> org.apache.activemq.transport.TransportSupport.doConsume(TransportSup
>> port.java:84)
>>        at
>> org.apache.activemq.transport.tcp.TcpTransport.doRun(TcpTransport.jav
>> a:204)
>>        at
>> org.apache.activemq.transport.tcp.TcpTransport.run(TcpTransport.java:
>> 186)
>>        at java.lang.Thread.run(Thread.java:619)
>> --
>> View this message in context:
>> http://old.nabble.com/javax.jms.JMSException%3A-Transaction-%27TX%3AID...%27-not-started-tp28528467p28528467.html
>> Sent from the ActiveMQ - User mailing list archive at Nabble.com.
>>
>>
> 
> 
> -- 
> http://blog.garytully.com
> 
> Open Source Integration
> http://fusesource.com
> 
> 

-- 
View this message in context: http://old.nabble.com/javax.jms.JMSException%3A-Transaction-%27TX%3AID...%27-not-started-tp28528467p28546752.html
Sent from the ActiveMQ - User mailing list archive at Nabble.com.


Mime
View raw message