-->
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.  [ 5 posts ] 
Author Message
 Post subject: No TransactionManagerLookup configured & Tomcat
PostPosted: Tue Jul 27, 2004 1:15 pm 
Beginner
Beginner

Joined: Wed Jul 21, 2004 6:50 pm
Posts: 27
Hi,

Am progressing with Hibernate, and, boy is it cool!!

Am a little confused still by this message which I get when I start tomcat:

INFO: No TransactionManagerLookup configured (in JTA environment...)
...
INFO: no JNDI name configured

Have looked through forums, but can't grasp how to set this up properly with Tomcat. I'm using Tomcat's connection pooling at the moment. Is this recommended? Should I use Tomcat's or Hibernate's transactions?

Cheers!

David


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 27, 2004 2:44 pm 
Hibernate Team
Hibernate Team

Joined: Mon Aug 25, 2003 9:11 pm
Posts: 4592
Location: Switzerland
It's all good, it means that Hibernate didn't bind the SessionFactory to JNDI, but that it will use Datasources from JNDI. This is the correct (one of them) configuration for Tomcat. You don't have a transaction manager in Tomcat.

_________________
JAVA PERSISTENCE WITH HIBERNATE
http://jpwh.org
Get the book, training, and consulting for your Hibernate team.


Top
 Profile  
 
 Post subject: Re: No TransactionManagerLookup configured & Tomcat
PostPosted: Tue Dec 06, 2011 2:38 am 
Beginner
Beginner

Joined: Mon Mar 02, 2009 3:36 pm
Posts: 25
I am facing same problem in Container managed EntityManager with JBoss app server. Getting following lines in log file :

Code:
INFO  [org.hibernate.transaction.TransactionManagerLookupFactory] (http-127.0.0.1-8080-1) No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)


When trying to execute an update sql getting this exception :

Code:
ERROR [org.hibernate.ejb.AbstractEntityManagerImpl] (http-127.0.0.1-8080-1) Unable to mark for rollback on PersistenceException:
java.lang.IllegalStateException: [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] [com.arjuna.ats.internal.jta.transaction.arjunacore.nosuchtx] No such transaction!
   at com.arjuna.ats.internal.jta.transaction.arjunacore.BaseTransaction.setRollbackOnly(BaseTransaction.java:191)
.
.
.

Code:
INFO  [STDOUT] (http-127.0.0.1-8080-1) Executing an update/delete query
ERROR [STDERR] (http-127.0.0.1-8080-1) javax.persistence.TransactionRequiredException: Executing an update/delete query
ERROR [STDERR] (http-127.0.0.1-8080-1)    at org.hibernate.ejb.QueryImpl.executeUpdate(QueryImpl.java:48)
.
.
.


I tried with the following property in my persistence.xml file :
Code:
<property name="hibernate.transaction.factory_class " value="org.hibernate.transaction.JTATransactionFactory"/>      
<property name="hibernate.transaction.manager_lookup_class" value="org.hibernate.transaction.JBossTransactionManagerLookup"/>
<property name="jta.UserTransaction"  value="java:comp/UserTransaction"/>


But the problem is not solved. Am I missing something ?? or I will have to do some configuration changes in JBoss AS to use TransactionManager.

Thanks,
Ganesh


Top
 Profile  
 
 Post subject: Re: No TransactionManagerLookup configured & Tomcat
PostPosted: Wed Dec 07, 2011 12:52 am 
Beginner
Beginner

Joined: Thu May 20, 2010 12:31 pm
Posts: 28
You didn't tell us which JBoss AS version you're using...

For JBoss AS 7 I once ran into this: http://community.jboss.org/message/619482

In essence,
Code:
<property name="hibernate.transaction.manager_lookup_class" value="..." />
has been superseded by
Code:
<property name="hibernate.transaction.jta.platform" value="com.company.project.util.CustomJBossAs7JtaPlatform" />
in your persistence.xml and due to a bug in JBoss AS 7 you must link your custom implementation:
Code:
import javax.transaction.TransactionManager;

import org.hibernate.service.jta.platform.internal.JBossAppServerJtaPlatform;
public class CustomJBossAs7JtaPlatform extends JBossAppServerJtaPlatform
{
   @Override
   protected TransactionManager locateTransactionManager()
   {
      return (TransactionManager)jndiService().locate("java:jboss/TransactionManager");
   }
}

HTH
Karsten


Top
 Profile  
 
 Post subject: Re: No TransactionManagerLookup configured & Tomcat
PostPosted: Wed Dec 07, 2011 12:34 pm 
Beginner
Beginner

Joined: Mon Mar 02, 2009 3:36 pm
Posts: 25
I am using JBoss 5.1.0 GA version.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 5 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.