Cannot enlist Synchronization. LocalTransactionCoordinator is completing or completed issue with hib

Posted by Bijendra Singh on Stack Overflow See other posts from Stack Overflow or by Bijendra Singh
Published on 2010-04-09T23:24:26Z Indexed on 2010/04/09 23:53 UTC
Read the original article Hit count: 475

I am getting Cannot enlist Synchronization. LocalTransactionCoordinator is completing or completed exception when integrating my method is called from the portlet.

I am using spring transaction management for handling all the hibernate transaction in the spring configuration file through AOP.

When I run my hibernate dao method for persisting the data through Junit its working fine.

Exception description:

I am facing an issue that is when I run my code through unit test case data is getting updated in database properly but when I run the same code with integration with portlet my code is executing finely but after the completion of transaction the records is not getting updated to database. The following error can be seen in the log which is

[4/7/10 23:06:38:685 MDT] 0000006c LocalTranCoor E   WLTC0014E: Cannot enlist Synchronization. LocalTransactionContainment is completing or completed.
[4/7/10 23:06:38:689 MDT] 0000006c LocalTransact E   J2CA0026E: Method addSync caught java.lang.IllegalStateException: Cannot enlist Synchronization. LocalTransactionCoordinator is completing or completed.
      at com.ibm.ws.LocalTransaction.LocalTranCoordImpl.enlistSynchronization(LocalTranCoordImpl.java(Compiled Code))
      at com.ibm.ejs.j2c.LocalTransactionWrapper.addSync(LocalTransactionWrapper.java(Compiled Code))
      at com.ibm.ejs.j2c.ConnectionManager.initializeForUOW(ConnectionManager.java(Compiled Code))
      at com.ibm.ejs.j2c.ConnectionManager.involveMCInTran(ConnectionManager.java(Compiled Code))
      at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
      at com.ibm.ejs.j2c.ConnectionManager.associateConnection(ConnectionManager.java(Compiled Code))
      at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.reactivate(WSJdbcConnection.java(Compiled Code))
      at com.ibm.ws.rsadapter.jdbc.WSJdbcConnection.getWarnings(WSJdbcConnection.java:1539)

© Stack Overflow or respective owner

Related posts about hibernate

Related posts about issue