Hibernate - Tomcat UserTransaction via JDNI not found
-----------------------------------------------------
Key: HHH-6208
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-6208
Project: Hibernate Core
Issue Type: Bug
Components: core
Affects Versions: 3.6.3
Environment: Tomcat 5.5
Hibernate 3.6.3
Oracle 11
Reporter: Guy
Priority: Blocker
I want to upgrade from Hibernate 3.4.2 to 3.6.3.
When running my application using Tomcat 5.5 and with Hibernate 3.4.2 everything works
fine.
But when upgrading to Hibernate 3.6.3 I receive this blocking error saying that the user
transaction could not be found.
Does someone know a workaround for this? I already tried to rename the JNDI name from
"java:comp/UserTransaction" to "UserTransaction" but without success.
Caused by: org.hibernate.TransactionException: Could not find UserTransaction in JNDI
[java:comp/UserTransaction]
at
org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:173)
at
org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:149)
at org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:213)
at org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:2112)
at org.hibernate.impl.SessionImpl.flush(SessionImpl.java:1210)
at com.vangenechten.commons.hibernate.HibernateUtil.flushAndClose(HibernateUtil.java:213)
at com.vangenechten.commons.hibernate.HibernateUtil.closeSession(HibernateUtil.java:252)
at com.vangenechten.commons.dao.BaseDAO.closingSession(BaseDAO.java:102)
at com.vangenechten.commons.dao.BaseDAO.safeCloseSession(BaseDAO.java:457)
... 25 more
Caused by: javax.naming.NamingException: Cannot create resource instance
at
org.apache.naming.factory.TransactionFactory.getObjectInstance(TransactionFactory.java:113)
at javax.naming.spi.NamingManager.getObjectInstance(Unknown Source)
at org.apache.naming.NamingContext.lookup(NamingContext.java:793)
at org.apache.naming.NamingContext.lookup(NamingContext.java:140)
at org.apache.naming.NamingContext.lookup(NamingContext.java:781)
at org.apache.naming.NamingContext.lookup(NamingContext.java:153)
at org.apache.naming.SelectorContext.lookup(SelectorContext.java:137)
at javax.naming.InitialContext.lookup(Unknown Source)
at
org.hibernate.transaction.JTATransactionFactory.getUserTransaction(JTATransactionFactory.java:163)
Kind Regards,
Guy
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://opensource.atlassian.com/projects/hibernate/secure/Administrators....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira