Atomikos Forum

Transaction no longer active  error during rollback

Same program worked with transactions-essentials-all-3.3.4.jar

But with transaction-3.9.3.jar has problem.

I start transactionManager.rollback();

It seems rollback start as entering state: ABORTING and
then entering state: TERMINATED.

But after that java.lang.IllegalStateException: Transaction no longer active at com.atomikos.icatch.imp.TxTerminatedStateHandler.rollbackWithStateCheck(TxTerminatedStateHandler.java:106)


Stack trace as follows

2015-07-03 17:19:16,039 [qtp5460308-24]-DEBUG (IndexRouter#index():47) - start rollback
2015-07-03 17:19:16,039 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - getCompositeTransaction()  returning instance with id 192.168.2.24.tm0000100015
2015-07-03 17:19:24,977 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - Coordinator 192.168.2.24.tm0000100015 entering state: ABORTING
2015-07-03 17:19:24,979 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - Forcing close of pending statement: update customer
  set tel = 'TEL ROLLBACK'
    , update_datetime = '2015-07-03 17:19:14.972000 +09:00:00'
    , update_user = 'TEST'
    , update_process = ''
    , version_no = version_no + 1
 where id in (
select dfloc.id
  from customer dfloc
 where dfloc.del_flag = 0
)
2015-07-03 17:19:24,979 [qtp5460308-24]-INFO  (Slf4jLogger#logInfo():16) - atomikos non-xa connection proxy for org.postgresql.jdbc4.Jdbc4Connection@6f8b28: transaction aborting - pessimistically closing all pending statements to avoid autoCommit after timeout
2015-07-03 17:19:24,979 [qtp5460308-24]-INFO  (Slf4jLogger#logInfo():16) - atomikos non-xa connection proxy for org.postgresql.jdbc4.Jdbc4Connection@6f8b28: rolling back on connection...
2015-07-03 17:19:24,981 [qtp5460308-24]-INFO  (Slf4jLogger#logInfo():16) - atomikos non-xa connection proxy for org.postgresql.jdbc4.Jdbc4Connection@6f8b28: resetting autoCommit to true
2015-07-03 17:19:24,981 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - ThreadLocalConnection: detected reusability
2015-07-03 17:19:24,981 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - AtomikosNonXAPooledConnection: notifying listener: atomikos connection pool 'NONXADBMS'
2015-07-03 17:19:24,981 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - atomikos connection pool 'NONXADBMS': connection AtomikosNonXAPooledConnection became available, notifying potentially waiting threads
2015-07-03 17:19:24,981 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - AtomikosNonXAPooledConnection: updating last time released
2015-07-03 17:19:24,981 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - AtomikosNonXAPooledConnection: updating last time released
2015-07-03 17:19:24,982 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - Coordinator 192.168.2.24.tm0000100015 entering state: TERMINATED
2015-07-03 17:19:24,983 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - Coordinator 192.168.2.24.tm0000100015 : stopping timer...
2015-07-03 17:19:24,983 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - Coordinator 192.168.2.24.tm0000100015 : disposing statehandler TERMINATED...
2015-07-03 17:19:24,983 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():20) - Coordinator 192.168.2.24.tm0000100015 : disposed.
2015-07-03 17:19:24,985 [qtp5460308-24]-DEBUG (Slf4jLogger#logDebug():33) - Ignoring error during event callback
java.lang.IllegalStateException: Transaction no longer active
    at com.atomikos.icatch.imp.TxTerminatedStateHandler.rollbackWithStateCheck(TxTerminatedStateHandler.java:106)
    at com.atomikos.icatch.imp.CompositeTransactionImp.doRollback(CompositeTransactionImp.java:237)
    at com.atomikos.icatch.imp.CompositeTerminatorImp.rollback(CompositeTerminatorImp.java:123)
    at com.atomikos.icatch.imp.CompositeTransactionImp.rollback(CompositeTransactionImp.java:346)
    at com.atomikos.icatch.imp.CompositeTransactionImp.entered(CompositeTransactionImp.java:373)
    at com.atomikos.finitestates.FSMImp.notifyListeners(FSMImp.java:188)
    at com.atomikos.finitestates.FSMImp.setState(FSMImp.java:279)
    at com.atomikos.icatch.imp.CoordinatorImp.setState(CoordinatorImp.java:416)
    at com.atomikos.icatch.imp.CoordinatorImp.setStateHandler(CoordinatorImp.java:273)
    at com.atomikos.icatch.imp.CoordinatorStateHandler.rollbackFromWithinCallback(CoordinatorStateHandler.java:769)
    at com.atomikos.icatch.imp.ActiveStateHandler$7.doRollback(ActiveStateHandler.java:319)
    at com.atomikos.icatch.imp.CoordinatorStateHandler.rollbackWithAfterCompletionNotification(CoordinatorStateHandler.java:832)
    at com.atomikos.icatch.imp.ActiveStateHandler.rollbackWithAfterCompletionNotification(ActiveStateHandler.java:49)
    at com.atomikos.icatch.imp.ActiveStateHandler.rollback(ActiveStateHandler.java:314)
    at com.atomikos.icatch.imp.CoordinatorImp.rollback(CoordinatorImp.java:741)
    at com.atomikos.icatch.imp.TransactionStateHandler.rollback(TransactionStateHandler.java:185)
    at com.atomikos.icatch.imp.TransactionStateHandler.rollbackWithStateCheck(TransactionStateHandler.java:203)
    at com.atomikos.icatch.imp.CompositeTransactionImp.doRollback(CompositeTransactionImp.java:237)
    at com.atomikos.icatch.imp.CompositeTerminatorImp.rollback(CompositeTerminatorImp.java:123)
    at com.atomikos.icatch.imp.CompositeTransactionImp.rollback(CompositeTransactionImp.java:346)
    at com.atomikos.icatch.jta.TransactionImp.rollback(TransactionImp.java:217)
    at com.atomikos.icatch.jta.TransactionManagerImp.rollback(TransactionManagerImp.java:448)
    at com.atomikos.icatch.jta.UserTransactionManager.rollback(UserTransactionManager.java:217)
    at dbfexample.router.IndexRouter.index(IndexRouter.java:48)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
    at java.lang.reflect.Method.invoke(Unknown Source)
    at org.jboss.resteasy.core.MethodInjectorImpl.invoke(MethodInjectorImpl.java:137)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invokeOnTarget(ResourceMethodInvoker.java:288)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:242)
    at org.jboss.resteasy.core.ResourceMethodInvoker.invoke(ResourceMethodInvoker.java:229)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:356)
    at org.jboss.resteasy.core.SynchronousDispatcher.invoke(SynchronousDispatcher.java:179)
    at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:220)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:56)
    at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:51)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:790)
    at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:738)
    at org.eclipse.jetty.servlet.ServletHandler.doHandle(ServletHandler.java:551)
    at org.eclipse.jetty.server.handler.ContextHandler.doHandle(ContextHandler.java:1111)
    at org.eclipse.jetty.servlet.ServletHandler.doScope(ServletHandler.java:478)
    at org.eclipse.jetty.server.handler.ContextHandler.doScope(ContextHandler.java:1045)
    at org.eclipse.jetty.server.handler.ScopedHandler.handle(ScopedHandler.java:141)
    at org.eclipse.jetty.server.handler.HandlerWrapper.handle(HandlerWrapper.java:97)
    at org.eclipse.jetty.server.Server.handle(Server.java:462)
    at org.eclipse.jetty.server.HttpChannel.handle(HttpChannel.java:279)
    at org.eclipse.jetty.server.HttpConnection.onFillable(HttpConnection.java:232)
    at org.eclipse.jetty.io.AbstractConnection$2.run(AbstractConnection.java:534)
    at org.eclipse.jetty.util.thread.QueuedThreadPool.runJob(QueuedThreadPool.java:607)
    at org.eclipse.jetty.util.thread.QueuedThreadPool$3.run(QueuedThreadPool.java:536)
    at java.lang.Thread.run(Unknown Source)
2015-07-03 17:19:24,987 [qtp5460308-24]-INFO  (Slf4jLogger#logInfo():16) - rollback() done of transaction 192.168.2.24.tm0000100015

Please help me
Masanobu Shimura Send private email
Friday, July 03, 2015
 
 
You can safely ignore this warning, it has no effect on the rollback outcome...
Guy Pardon Send private email
Saturday, July 11, 2015
 
 
Are there two places in your code that terminate the transaction? That would explain why you get this warning.
Guy Pardon Send private email
Saturday, July 11, 2015
 
 

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics