javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.

Spring JIRA | Eugene Prokopiev | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    SPR-2461 must be reopened. All works with default DefaultMessageListenerContainer.cacheLevel=CACHE_SESSION but thre are some errors with other cacheLevel values. In the same configuration described in SPR-2461 I got: with CACHE_CONNECTION on starting context: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Already closed at org.jencks.pool.PooledSpringXAConnection.getConnection(PooledSpringXAConnection.java:284) at org.jencks.pool.PooledSpringXAConnection.start(PooledSpringXAConnection.java:95) at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:195) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:483) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection with CACHE_SESSION and CACHE_CONSUMER on receiving message: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction. at org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109) at org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:658) at org.apache.activemq.ActiveMQMessageConsumer.beforeMessageIsConsumed(ActiveMQMessageConsumer.java:610) at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:469) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveMessage(DefaultMessageListenerContainer.java:560) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:505) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection

    Spring JIRA | 1 decade ago | Eugene Prokopiev
    javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.
  2. 0

    SPR-2461 must be reopened. All works with default DefaultMessageListenerContainer.cacheLevel=CACHE_SESSION but thre are some errors with other cacheLevel values. In the same configuration described in SPR-2461 I got: with CACHE_CONNECTION on starting context: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Already closed at org.jencks.pool.PooledSpringXAConnection.getConnection(PooledSpringXAConnection.java:284) at org.jencks.pool.PooledSpringXAConnection.start(PooledSpringXAConnection.java:95) at org.springframework.jms.connection.ConnectionFactoryUtils.doGetTransactionalSession(ConnectionFactoryUtils.java:195) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:483) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection with CACHE_SESSION and CACHE_CONSUMER on receiving message: ERROR DefaultMessageListenerContainer - Setup of JMS message listener invoker failed - trying to recover javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction. at org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109) at org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:658) at org.apache.activemq.ActiveMQMessageConsumer.beforeMessageIsConsumed(ActiveMQMessageConsumer.java:610) at org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:469) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveMessage(DefaultMessageListenerContainer.java:560) at org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:505) at org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859) at org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818) at org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203) at java.lang.Thread.run(Thread.java:595) INFO DefaultMessageListenerContainer - Successfully refreshed JMS Connection

    Spring JIRA | 1 decade ago | Eugene Prokopiev
    javax.jms.JMSException: Session's XAResource has not been enlisted in a distributed transaction.

    Root Cause Analysis

    1. javax.jms.JMSException

      Session's XAResource has not been enlisted in a distributed transaction.

      at org.apache.activemq.ActiveMQXASession.doStartTransaction()
    2. ActiveMQ :: Core
      ActiveMQMessageConsumer.receive
      1. org.apache.activemq.ActiveMQXASession.doStartTransaction(ActiveMQXASession.java:109)
      2. org.apache.activemq.ActiveMQMessageConsumer.ackLater(ActiveMQMessageConsumer.java:658)
      3. org.apache.activemq.ActiveMQMessageConsumer.beforeMessageIsConsumed(ActiveMQMessageConsumer.java:610)
      4. org.apache.activemq.ActiveMQMessageConsumer.receive(ActiveMQMessageConsumer.java:469)
      4 frames
    3. Spring Framework
      DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run
      1. org.springframework.jms.listener.DefaultMessageListenerContainer.receiveMessage(DefaultMessageListenerContainer.java:560)
      2. org.springframework.jms.listener.DefaultMessageListenerContainer.doReceiveAndExecute(DefaultMessageListenerContainer.java:505)
      3. org.springframework.jms.listener.DefaultMessageListenerContainer.receiveAndExecute(DefaultMessageListenerContainer.java:441)
      4. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.invokeListener(DefaultMessageListenerContainer.java:859)
      5. org.springframework.jms.listener.DefaultMessageListenerContainer$AsyncMessageListenerInvoker.run(DefaultMessageListenerContainer.java:818)
      5 frames
    4. Spring Core
      SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run
      1. org.springframework.core.task.SimpleAsyncTaskExecutor$ConcurrencyThrottlingRunnable.run(SimpleAsyncTaskExecutor.java:203)
      1 frame
    5. Java RT
      Thread.run
      1. java.lang.Thread.run(Thread.java:595)
      1 frame