Topic
No replies
Rachid_AAB
Rachid_AAB
3 Posts
ACCEPTED ANSWER

Pinned topic Hibernate3.2 JTA EJB3: Current transaction is not in progress

‏2012-09-28T00:46:39Z |
Hi All,

After Migrating an Application J2EE from JDK 1.4 to JDK6, WAS6.1 to WAS7, EJB2 to EJB3 (Ejb session: persistence with Hibernate3.2 : No JPA); An Error is blocking transaction to an DB Oracle (We use JTA).

Error traced : "Current transaction is not in progress".

This error is occured when we tray to instanciate/recupere current session hibernate from SessionFactory:
sessionFactory.getCurrentSession();
Extract of file config Hibernate.cfg.xml:

<hibernate-configuration> <session-factory> <property name=
"session_factory_name">Mgb/HibernateFactory</property> <property name=
"show_sql">false</property> <property name=
"connection.datasource">jdbc/mgb</property> <property name=
"dialect">org.hibernate.dialect.Oracle10gDialect</property> <property name=
"hibernate.jta.UserTransaction">java:comp/UserTransaction</property> <property name=
"hibernate.current_session_context_class">org.hibernate.context.JTASessionContext</property> <property name=
"hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property> <property name=
"hibernate.transaction.manager_lookup_class">org.hibernate.transaction.WebSphereExtendedJTATransactionLookup</property> . . . </session-factory> <hibernate-configuration>


SomeOne can help to resolve this probleme?

Thank you for advance.

Rachid AABIDI