Atomikos Forum |
|
I had the issue with Atomikos transaction this morning.
I would like to say that Atomikos has been successfully configured with Hibernate(JPA) and it works good so far. Today I spotted the following log inside the log file: [23-01-2012 11:14:12.129] INFO [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - createCompositeTransaction ( 10000 ): created new ROOT transaction with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [org.hibernate.impl.SessionImpl] - opened session at timestamp: 1327317252129 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [org.hibernate.ejb.AbstractEntityManagerImpl] - Looking for a JTA transaction to join [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [org.hibernate.ejb.AbstractEntityManagerImpl] - mark transaction for rollback [23-01-2012 11:14:12.129] INFO [Atomikos:1] [com.atomikos.diagnostics.Slf4jConsole] - setRollbackOnly() called for transaction 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] INFO [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - setRollbackOnly() called for transaction 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] DEBUG [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - getCompositeTransaction() returning instance with id 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] INFO [UponIntervalExportationRunnable-pool-1-thread-1] [com.atomikos.diagnostics.Slf4jConsole] - rollback() done of transaction 10.214.34.85.tm0003700032 [23-01-2012 11:14:12.129] WARN and the root exception cause was: Caused by: javax.persistence.PersistenceException: org.hibernate.TransactionException: could not register synchronization with JTA TransactionManager at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1387) at org.hibernate.ejb.AbstractEntityManagerImpl.convert(AbstractEntityManagerImpl.java:1315) at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1250) at org.hibernate.ejb.AbstractEntityManagerImpl.postInit(AbstractEntityManagerImpl.java:168) at org.hibernate.ejb.EntityManagerImpl.<init>(EntityManagerImpl.java:84) at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:112) at org.hibernate.ejb.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:107) ... 12 more Caused by: org.hibernate.TransactionException: could not register synchronization with JTA TransactionManager at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:229) at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:2112) at org.hibernate.impl.SessionImpl.isOpen(SessionImpl.java:365) at org.hibernate.ejb.AbstractEntityManagerImpl.joinTransaction(AbstractEntityManagerImpl.java:1174) ... 24 more Caused by: java.lang.IllegalStateException: wrong state: TERMINATED at com.atomikos.icatch.imp.CoordinatorImp.registerSynchronization(CoordinatorImp.java:655) at com.atomikos.icatch.imp.TransactionStateHandler.registerSynchronization(TransactionStateHandler.java:146) at com.atomikos.icatch.imp.CompositeTransactionImp.registerSynchronization(CompositeTransactionImp.java:248) at com.atomikos.icatch.jta.TransactionImp.registerSynchronization(TransactionImp.java:175) at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:215) ... 27 more I'm sure that's not a timeout issue because the transaction was newly created, but the Atomikos:1 thread set it to rollback immediately. It looks a little bit like Atomikos synchronization issue because the next subsequent call to the same method with same args was successful (it runs every 30 seconds). What's the responsibility of Atomikos:1 thread? I would be grateful for advice. |