-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Hibernate - Tomcat UserTransaction via JDNI not found
PostPosted: Mon May 09, 2011 2:47 am 
Newbie

Joined: Mon May 09, 2011 2:33 am
Posts: 1
I want to upgrade from Hibernate 3.4.2 to 3.6.3.

When running the 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


Top
 Profile  
 
 Post subject: Re: Hibernate - Tomcat UserTransaction via JDNI not found
PostPosted: Thu Feb 27, 2014 10:08 am 
Newbie

Joined: Thu Feb 27, 2014 10:05 am
Posts: 1
I am facing exactly the same problem.
Have you any solution ?


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.