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: org.hibernate.HibernateException: No TransactionManagerLooku
PostPosted: Mon May 10, 2010 2:54 pm 
Newbie

Joined: Mon May 10, 2010 2:41 pm
Posts: 5
Hi,
I am using Hibernate 3.2.2 and Websphere 7.5.5.

Hibernate.cfg.xml

<hibernate-configuration>
<session-factory>
<property name="connection.driver_class">oracle.jdbc.driver.OracleDriver</property>
<property name="hibernate.connection.datasource">jdbc/merlinDS</property>
<property name="dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="current_session_context_class">jta</property>
<property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>
<property name="jta.UserTransaction">java:comp/UserTransaction</property>
<property name="show_sql">true</property>
<mapping resource="sample/Address.hbm.xml"/>
</session-factory>
</hibernate-configuration>


This is the code

Session sessionObj = HibernateUtil.getSessionFactory().getCurrentSession();
sessionObj.beginTransaction();
String SQL="from sample.ConfigurationOption as configoption";
Query query=sessionObj.createQuery("from sample.Address as addr");
Collection coll=query.list();
System.out.println("size"+coll.size());
sessionObj.getTransaction().commit();

I am getting the exception No TransactionManagerLookup. Any help is appreciated.

Thanks
Sudha


Top
 Profile  
 
 Post subject: Re: org.hibernate.HibernateException: No TransactionManagerLooku
PostPosted: Mon May 10, 2010 4:05 pm 
Newbie

Joined: Mon May 10, 2010 1:41 pm
Posts: 15
What happens if you use:

org.hibernate.transaction.WebSphereExtendedJTATransactionLookup

In place of <property name="hibernate.transaction.factory_class">org.hibernate.transaction.JTATransactionFactory</property>


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.