[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3110?page=c...
]
joel winteregg commented on HHH-3110:
-------------------------------------
I just get the same behaviour "Could not find UserTransaction in JNDI " using
Bitronix Transaction Manager (BTM) as a standalone JTA implementation and postgresql.
Chris, If I understand you well (and regarding change done in
http://opensource.atlassian.com/projects/hibernate/browse/HHH-1956), now Hibernate is
trying to bind to the transaction manager during startup (or getCurrentSession). So the
JTA Manager instance should be created by Hibernate and not anymore looked up (using a
look up class as follow:
http://docs.codehaus.org/display/BTM/Hibernate#Hibernate-Transactionmanag...) ?
JTATransaction could not find UserTransaction in JNDI when working
with JOTM
----------------------------------------------------------------------------
Key: HHH-3110
URL:
http://opensource.atlassian.com/projects/hibernate/browse/HHH-3110
Project: Hibernate3
Issue Type: Bug
Components: core
Affects Versions: 3.2.6
Environment: Hibernate 3.2.6, Oracle9i, jotm-2.0.10
Reporter: Felix von Delius
Assignee: Chris Bredesen
Priority: Critical
In our local (out-of-container) environment, we use JTA with JOTM as the JTA
implementation.
It seems that the fix for HHH-1956 has this side effect, since I build a patched version
of Hibernate-3.2.6 with the lazy initialization of hibernateTransaction commented out
(lines 171-173 in JDBCContext.java).
Here is the relevant part of the stacktrace caused by the problem:
[ID:KxMaQ USER:\OPTIMMOSYS] 15:27:04,107 ERROR [JTATransaction] Could not find
UserTransaction in JNDI
javax.naming.NameNotFoundException
at
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookupCtx(CompNamingContext.java:689)
at
org.objectweb.carol.jndi.enc.java.CompNamingContext.lookup(CompNamingContext.java:179)
at org.objectweb.carol.jndi.enc.java.JavaURLContext.lookup(JavaURLContext.java:138)
at javax.naming.InitialContext.lookup(InitialContext.java:361)
at org.hibernate.transaction.JTATransaction.<init>(JTATransaction.java:60)
at
org.hibernate.transaction.JTATransactionFactory.createTransaction(JTATransactionFactory.java:57)
at
org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:172)
at org.hibernate.jdbc.JDBCContext.<init>(JDBCContext.java:76)
at org.hibernate.impl.SessionImpl.<init>(SessionImpl.java:213)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:473)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:497)
at org.hibernate.impl.SessionFactoryImpl.openSession(SessionFactoryImpl.java:505)
at
com.ing.diba.mws.tcore.persistence.HibernateSessionSourceImpl.createPersistenceProvider(HibernateSessionSourceImpl.java:45)
Our configuration in this case contains:
hibernate.transaction.manager_lookup_class=org.hibernate.transaction.JOTMTransactionManagerLookup
--
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