Unable to locate current JTA Transaction when using Hibernate3 in EAP 6
Issue
- We are migrating Hibernate3 from JBoss AS 5 to JBoss EAP6.4,followed the guide to use Hibernate3 in EAP6.
Following is the stack trace:
DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] (MSC service thread 1-4) JNDI lookup: DefaultHibernateFactory
DEBUG [org.hibernate.impl.SessionFactoryObjectFactory] (MSC service thread 1-4) lookup: uid=c1bbfd9d-8ed5-4a42-9ca1-f0e16259650c
WARN MSC service thread 1-4) load roles failed: Unable to locate current JTA transaction
ERROR [stderr] (MSC service thread 1-4) org.hibernate.HibernateException: Unable to locate current JTA transaction
ERROR [stderr] (MSC service thread 1-4) at org.hibernate.context.JTASessionContext.currentSession(JTASessionContext.java:88)
ERROR [stderr] (MSC service thread 1-4) at org.hibernate.impl.SessionFactoryImpl.getCurrentSession(SessionFactoryImpl.java:687)
- If we don't bind hibernate to JNDI, how can we look-up it and use it?
Environment
- Red Hat JBoss Enterprise Application Platform (EAP)
- 6.4.0
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
