title: JtaTransactionManager no rollback after failed commit during "flush"
body: <p><br/>
  <strong>Update:</strong> I was testing it with Bitronix TM and it rollbacks perfectly, so the issue is in JBoss TM (arjuna) or in my configuration.
  <br/></p>
  
  <p><strong>Update 2:</strong> It looks like transactions are not global, I've tried different datasources, Bitronix datasource has <em>allowLocalTransactions</em> property and after setting it my application throws an exception that something tried to use it in local mode. If I use Bitronix with this datasource it works without any errors. I believe there is something wrong in configs.</p>
  
  <p>I have an issue with JTA transactions. I'm using Tomcat 7 + Hibernate 4 + Spring 3 + JBoss TS 4 and JTA transactions.</p>
  
  <p>Suppose there is the following method:</p>
  
  <pre><code>@Transactional(propagation = Propagation.REQUIRED)
  public void testMethod() {
      insertOfSomeNewEntityInstance();
      updateOfAnotherEntity();
  }
  
  private void insertOfSomeNewEntityInstance() {
      SomeEntity entity = new SomeEntity();
      someEntityDAO.save(entity);
  }
  
  private void updateOfAnotherEntity() {
      AnotherEntity anotherEntity = anotherEntityDAO.findBySomeProperty(1L);
      anotherEntity.incrementSomeValue();
      anotherEntityDAO.save(anotherEntity);
  }
  </code></pre>
  
  <p>If this method throws <em>"org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)"</em> during "updateOfAnotherEntity()" method execution or any other runtime exception that might happen during "flush" (Hibernate also shows: <em>HHH000346: Error during managed flush [Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect)</em>.
  then the result of insertOfSomeNewEntityInstance() execution is not rolled back.</p>
  
  <p>After debugging this issue I found "doCommit" method in org.springframework.transaction.jta.JtaTransaction Manager</p>
  
  <pre><code>@Override
      protected void doCommit(DefaultTransactionStatus status) {
          JtaTransactionObject txObject = (JtaTransactionObject) status.getTransaction();
          try {
              int jtaStatus = txObject.getUserTransaction().getStatus();
              if (jtaStatus == Status.STATUS_NO_TRANSACTION) {
                  throw new UnexpectedRollbackException("JTA transaction already completed - probably rolled back");
              }
              if (jtaStatus == Status.STATUS_ROLLEDBACK) {
                  try {
                      txObject.getUserTransaction().rollback();
                  }
                  catch (IllegalStateException ex) {
                      if (logger.isDebugEnabled()) {
                          logger.debug("Rollback failure with transaction already marked as rolled back: " + ex);
                      }
                  }
                  throw new UnexpectedRollbackException("JTA transaction already rolled back (probably due to a timeout)");
              }
              txObject.getUserTransaction().commit();
          }
          catch (RollbackException ex) {
              throw new UnexpectedRollbackException(
                      "JTA transaction unexpectedly rolled back (maybe due to a timeout)", ex);
          }
          catch (HeuristicMixedException ex) {
              throw new HeuristicCompletionException(HeuristicCompletionException.STATE_MIXED, ex);
          }
          catch (HeuristicRollbackException ex) {
              throw new HeuristicCompletionException(HeuristicCompletionException.STATE_ROLLED_BACK, ex);
          }
          catch (IllegalStateException ex) {
              throw new TransactionSystemException("Unexpected internal transaction state", ex);
          }
          catch (SystemException ex) {
              throw new TransactionSystemException("JTA failure on commit", ex);
          }
      }
  </code></pre>
  
  <p>If "txObject.getUserTransaction().commit();" fails with RollbackException then this method throws UnexpectedRollbackException and here is the part of org.springframework.transaction.support.AbstractPl atformTransactionManager processCommit(...) that catches it:</p>
  
  <pre><code>}
   catch (UnexpectedRollbackException ex) {
                  // can only be caused by doCommit
                  triggerAfterCompletion(status, TransactionSynchronization.STATUS_ROLLED_BACK);
                  throw ex;
      }
  </code></pre>
  
  <p>I do not see any rollbacks in triggerAfterCompletion() method and after this method everything else just cleans up resources.</p>
  
  <p><strong>To sum up</strong>, spring/jboss just commits the result of insertOfSomeNewEntityInstance(), fails to execute updateOfAnotherEntity() because of concurrent modification error, and does not rollback anything. If I manually throw any runtime or checked exception from updateOfAnotherEntity() it rollbacks correctly, the issue occurs only when Hibernate throws some runtime exception during "flush".</p>
  
  <p><strong>hibernate.cfg</strong></p>
  
  <pre><code>&lt;?xml version='1.0' encoding='utf-8'?&gt;
  &lt;!DOCTYPE hibernate-configuration PUBLIC
  "-//Hibernate/Hibernate Configuration DTD//EN"
  "http://www.hibernate.org/dtd/hibernate-configuration-3.0.dtd"&gt;
  
  &lt;hibernate-configuration&gt;
  &lt;session-factory&gt;
      &lt;property name="dialect"&gt;${dialect}&lt;/property&gt;
      &lt;property name="max_fetch_depth"&gt;1&lt;/property&gt;
      &lt;property name="hibernate.jdbc.batch_size"&gt;25&lt;/property&gt;
      &lt;property name="show_sql"&gt;false&lt;/property&gt;
      &lt;property name="format_sql"&gt;false&lt;/property&gt;
      &lt;property name="use_sql_comments"&gt;false&lt;/property&gt;
      &lt;property name="hibernate.session_factory_name"&gt;TestSessionFactory&lt;/property&gt;
      &lt;property name="hibernate.session_factory_name_is_jndi"&gt;false&lt;/property&gt;
      &lt;property name="hibernate.current_session_context_class"&gt;jta&lt;/property&gt;
      &lt;property name="hibernate.transaction.factory_class"&gt;org.hibernate.transaction.JTATransactionFactory&lt;/property&gt;
      &lt;property name="hibernate.transaction.jta.platform"&gt;org.hibernate.service.jta.platform.internal.JBossStandAloneJtaPlatform&lt;/property&gt;
      &lt;property name="hibernate.id.new_generator_mappings"&gt;true&lt;/property&gt;
      &lt;property name="hibernate.cache.infinispan.cfg"&gt;infinispan.xml&lt;/property&gt;
      &lt;property name="hibernate.cache.region.factory_class"&gt;org.hibernate.cache.infinispan.InfinispanRegionFactory&lt;/property&gt;
  &lt;/session-factory&gt;
  &lt;/hibernate-configuration&gt;
  </code></pre>
  
  <p><strong>jbossts-properties.xml</strong></p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8"?&gt;
  &lt;!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"&gt;
  &lt;properties&gt;
      &lt;entry key="CoordinatorEnvironmentBean.commitOnePhase"&gt;YES&lt;/entry&gt;
      &lt;entry key="CoordinatorEnvironmentBean.defaultTimeout"&gt;300&lt;/entry&gt;
      &lt;entry key="ObjectStoreEnvironmentBean.transactionSync"&gt;ON&lt;/entry&gt;
      &lt;entry key="CoreEnvironmentBean.nodeIdentifier"&gt;1&lt;/entry&gt;
      &lt;entry key="JTAEnvironmentBean.xaRecoveryNodes"&gt;1&lt;/entry&gt;
      &lt;entry key="JTAEnvironmentBean.xaResourceOrphanFilterClassNames"&gt;
          com.arjuna.ats.internal.jta.recovery.arjunacore.JTATransactionLogXAResourceOrphanFilter
          com.arjuna.ats.internal.jta.recovery.arjunacore.JTANodeNameXAResourceOrphanFilter
      &lt;/entry&gt;
  
      &lt;entry key="CoreEnvironmentBean.socketProcessIdPort"&gt;0&lt;/entry&gt;
  
      &lt;entry key="RecoveryEnvironmentBean.recoveryModuleClassNames"&gt;
          com.arjuna.ats.internal.arjuna.recovery.AtomicActionRecoveryModule
          com.arjuna.ats.internal.txoj.recovery.TORecoveryModule
          com.arjuna.ats.internal.jta.recovery.arjunacore.XARecoveryModule
      &lt;/entry&gt;
  
      &lt;entry key="RecoveryEnvironmentBean.expiryScannerClassNames"&gt;
          com.arjuna.ats.internal.arjuna.recovery.ExpiredTransactionStatusManagerScanner
      &lt;/entry&gt;
  
      &lt;entry key="RecoveryEnvironmentBean.recoveryPort"&gt;4712&lt;/entry&gt;
  
      &lt;entry key="RecoveryEnvironmentBean.recoveryAddress"&gt;&lt;/entry&gt;
  
      &lt;entry key="RecoveryEnvironmentBean.transactionStatusManagerPort"&gt;0&lt;/entry&gt;
      &lt;entry key="RecoveryEnvironmentBean.transactionStatusManagerAddress"&gt;&lt;/entry&gt;
  
      &lt;entry key="RecoveryEnvironmentBean.recoveryListener"&gt;YES&lt;/entry&gt;
  
  &lt;/properties&gt;
  </code></pre>
  
  <p><strong>Part of applicationContext.xml</strong></p>
  
  <pre><code>&lt;bean class="com.arjuna.ats.jta.TransactionManager" factory-method="transactionManager" id="arjunaTransactionManager"&gt;&lt;/bean&gt;
      &lt;bean class="com.arjuna.ats.jta.UserTransaction" factory-method="userTransaction" id="arjunaUserTransaction"&gt;&lt;/bean&gt;
  
      &lt;bean id="transactionManager" class="org.springframework.transaction.jta.JtaTransactionManager" &gt;
          &lt;property name="transactionManager" ref="arjunaTransactionManager"/&gt;
          &lt;property name="userTransaction" ref="arjunaUserTransaction"/&gt;
      &lt;/bean&gt;
  
      &lt;bean id="dataSource" class="org.apache.tomcat.jdbc.pool.XADataSource" destroy-method="close"&gt;
          &lt;property name="url" value="${database.url}" /&gt;
          &lt;property name="driverClassName" value="oracle.jdbc.OracleDriver" /&gt;
          &lt;property name="username" value="${database.user}" /&gt;
          &lt;property name="password" value="${database.password}" /&gt;
      &lt;/bean&gt;
  
  &lt;bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean" destroy-method="destroy"&gt;
          &lt;property name="dataSource" ref="dataSource"/&gt;
          &lt;property name="configLocation"&gt;&lt;value&gt;classpath:hibernate.cfg.xml&lt;/value&gt;&lt;/property&gt;
          &lt;property name="hibernateProperties"&gt;
              &lt;props&gt;
                  &lt;prop key="hibernate.cache.use_second_level_cache"&gt;false&lt;/prop&gt;
                  &lt;prop key="hibernate.cache.use_query_cache"&gt;false&lt;/prop&gt;
              &lt;/props&gt;
          &lt;/property&gt;
      &lt;/bean&gt;
  
      &lt;tx:annotation-driven mode="proxy" proxy-target-class="false" transaction-manager="transactionManager"/&gt;
  </code></pre>
  
  <p><strong>And the log:</strong></p>
  
  <pre><code>Completing transaction for [...testMethod]
  Triggering beforeCommit synchronization
  Triggering beforeCompletion synchronization
  BaseTransaction.getStatus
  TransactionImple.getStatus
  Initiating transaction commit
  BaseTransaction.getStatus
  TransactionImple.getStatus
  BaseTransaction.commit
  TransactionImple.commitAndDisassociate
  SynchronizationImple.beforeCompletion
  BaseTransaction.getStatus
  TransactionImple.getStatus
  
  insert into .....
  update ... set ...
  
  BaseTransaction.setRollbackOnly
  TransactionImple.setRollbackOnly
  BasicAction::preventCommit( BasicAction: 0:ffffc0a800ab:8d15:51b6fe47:3 status: ActionStatus.RUNNING)
  HHH000346: Error during managed flush [Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [...]]
  ARJUNA012125: TwoPhaseCoordinator.beforeCompletion - failed for SynchronizationImple&lt; 0:ffffc0a800ab:8d15:51b6fe47:4, org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization@76d7a0b8 &gt;
  org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [...]
          at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2509) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3228) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3126) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3456) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:287) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:113) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) [narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) [spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) [spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at $Proxy126.testMethod(Unknown Source) [na:na]
          ...
  
  BasicAction::preventCommit( BasicAction: 0:ffffc0a800ab:8d15:51b6fe47:3 status: ActionStatus.ABORT_ONLY)
  BasicAction::Abort() for action-id 0:ffffc0a800ab:8d15:51b6fe47:3
  SynchronizationImple.afterCompletion
  TransactionImple.equals
  SynchronizationImple.afterCompletion
  BasicAction::removeChildThread () action 0:ffffc0a800ab:8d15:51b6fe47:3 removing TSThread:2
  BasicAction::removeChildThread () action 0:ffffc0a800ab:8d15:51b6fe47:3 removing TSThread:2 result = true
  TransactionReaper::remove ( BasicAction: 0:ffffc0a800ab:8d15:51b6fe47:3 status: ActionStatus.ABORTED )
  Triggering afterCompletion synchronization
  Clearing transaction synchronization
  Exception
  org.springframework.transaction.UnexpectedRollbackException: JTA transaction unexpectedly rolled back (maybe due to a timeout); nested exception is javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
          at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1013) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.support.AbstractPlatformTransactionManager.processCommit(AbstractPlatformTransactionManager.java:754) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.support.AbstractPlatformTransactionManager.commit(AbstractPlatformTransactionManager.java:723) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.interceptor.TransactionAspectSupport.commitTransactionAfterReturning(TransactionAspectSupport.java:387) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.transaction.interceptor.TransactionInterceptor.invoke(TransactionInterceptor.java:120) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:172) ~[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:202) ~[spring-aop-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          at $Proxy126.testMethod(Unknown Source) ~[na:na]
          ...
  Caused by: javax.transaction.RollbackException: ARJUNA016053: Could not commit transaction.
          at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1177) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.commit(BaseTransaction.java:126) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at org.springframework.transaction.jta.JtaTransactionManager.doCommit(JtaTransactionManager.java:1010) ~[spring-tx-3.1.4.RELEASE.jar:3.1.4.RELEASE]
          ... 32 common frames omitted
  Caused by: org.hibernate.StaleObjectStateException: Row was updated or deleted by another transaction (or unsaved-value mapping was incorrect): [...]
          at org.hibernate.persister.entity.AbstractEntityPersister.check(AbstractEntityPersister.java:2509) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3228) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.updateOrInsert(AbstractEntityPersister.java:3126) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.persister.entity.AbstractEntityPersister.update(AbstractEntityPersister.java:3456) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.action.internal.EntityUpdateAction.execute(EntityUpdateAction.java:140) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.spi.ActionQueue.execute(ActionQueue.java:377) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:369) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.spi.ActionQueue.executeActions(ActionQueue.java:287) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.event.internal.AbstractFlushingEventListener.performExecutions(AbstractFlushingEventListener.java:339) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.event.internal.DefaultFlushEventListener.onFlush(DefaultFlushEventListener.java:52) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.internal.SessionImpl.flush(SessionImpl.java:1234) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.internal.SessionImpl.managedFlush(SessionImpl.java:404) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.transaction.synchronization.internal.SynchronizationCallbackCoordinatorImpl.beforeCompletion(SynchronizationCallbackCoordinatorImpl.java:113) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at org.hibernate.engine.transaction.synchronization.internal.RegisteredSynchronization.beforeCompletion(RegisteredSynchronization.java:53) ~[hibernate-core-4.2.2.Final.jar:4.2.2.Final]
          at com.arjuna.ats.internal.jta.resources.arjunacore.SynchronizationImple.beforeCompletion(SynchronizationImple.java:76) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.beforeCompletion(TwoPhaseCoordinator.java:273) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.arjuna.coordinator.TwoPhaseCoordinator.end(TwoPhaseCoordinator.java:93) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.arjuna.AtomicAction.commit(AtomicAction.java:162) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          at com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionImple.commitAndDisassociate(TransactionImple.java:1165) ~[narayana-jta-4.17.4.Final.jar:4.17.4.Final]
          ... 34 common frames omitted
  </code></pre>