Spring4 Hibernate 5.4.13 JTA transaction Configurations

Hi,

I am trying to upgrade my application from Hibernate 3.x to 5.4.13 and running into error “org.hibernate.HibernateException: Unable to locate current JTA transaction”.

Caused by: org.hibernate.HibernateException: Unable to locate current JTA transaction
at org.hibernate.context.internal.JTASessionContext.currentSession(JTASessionContext.java:75) ~[hibernate-core-5.4.13.Final.jar:5.4.13.Final]
at org.hibernate.internal.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:473) ~[hibernate-core-5.4.13.Final.jar:5.4.13.Final]

Could expertise here advice what I am missing in the configurations that causing this issue?

    <property name="hibernate.transaction.factory_class">org.hibernate.resource.transaction.backend.jta.internal.JtaTransactionCoordinatorImpl</property>
    <!-- How to produce transaction -->
    <property name="hibernate.transaction.jta.platform">org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform</property>
    <property name="hibernate.transaction.coordinator_class">jta</property>
    <!-- Session context with JTA -->
    <property name="hibernate.current_session_context_class">jta</property>

Appreciate your input and guidance on this as it’s one of the blocker issue for me to move forward with this upgrade.