• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

org.hibernate.HibernateException: No TransactionManagerLookup specified

 
sudha swami
Ranch Hand
Posts: 186
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
Randeep Singh Arora
Greenhorn
Posts: 6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Just comment the rest of the lines
Session sessionObj = HibernateUtil.getSessionFactory().getCurrentSession(); execute this code see what happens..

make sure you have all the required jars in your lib folder...I believe you have missing JTA transaction jar from your workspace.
 
Ajay Labade
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
check the class path and jar files
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic