Hi
I'm having problems with CMT transactions. Any ideas would be appreciated. I'm running inside a session bean that uses CMT.
The following code completes without errors, but when the transactions ends I get an exception.
Code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();
Session session = sessionFactory.getCurrentSession();
session.save(periode);
Configuration:
Code:
<session-factory>
<property name="hibernate.connection.datasource">jdbc/EPJI</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebSphereTransactionManagerLookup</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.transaction.flush_before_completion">true</property>
<property name="hibernate.transaction.auto_close_session">true</property>
<!-- Echo all executed SQL to stdout -->
<property name="show_sql">true</property>
<!-- Drop and re-create the database schema on startup -->
<property name="hbm2ddl.auto">create</property>
<mapping resource="Faellesformat.hbm.xml"/>
</session-factory>
Every time a transaction completes I get the following exception in the server log:
Code:
[05-10-05 16:11:22:899 CEST] 1c2fa186 WSRdbXaResour E DSRA0304E: XAException occurred. XAException contents and details are: The cause is : null.
[05-10-05 16:11:22:899 CEST] 1c2fa186 WSRdbXaResour E DSRA0302E: XAException occurred. Error code is: XAER_RMERR. Exception is: <null>
[05-10-05 16:11:22:915 CEST] 1c2fa186 XARminst E WTRN0037W: The transaction service encountered an error on an xa_recover operation.. The error code was XAER_RMERR. The exception stack trace follows: javax.transaction.xa.XAException
at oracle.jdbc.xa.OracleXAResource.recover(OracleXAResource.java:628)
at com.ibm.ws.rsadapter.spi.WSRdbXaResourceImpl.recover(WSRdbXaResourceImpl.java:772)
at com.ibm.ws.Transaction.JTA.XARminst.recover(XARminst.java:130)
at com.ibm.ws.Transaction.JTA.XARecoveryData.recover(XARecoveryData.java:673)
at com.ibm.ws.Transaction.JTA.RecoveryManager.resync(RecoveryManager.java:1415)
at com.ibm.ws.Transaction.JTA.ResyncThread.run(RecoveryManager.java:1448)
That's it. The client just receives a generic transaction rolled back exception. Any ideas??