-->
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.  [ 1 post ] 
Author Message
 Post subject: Problem with Hibernate3 on WAS 5.1
PostPosted: Sat Jul 07, 2007 7:29 am 
Newbie

Joined: Sat Jul 07, 2007 7:23 am
Posts: 3
I have a problem running Hibernate 3 on Websphere 5.1. I always get the following error when building the hibernate sessionfactory
Code:
SessionFactory sessionFactory = new Configuration().configure().buildSessionFactory();

org.hibernate.HibernateException: Unable to locate current JTA transaction

My config file looks like follows:

Code:
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE hibernate-configuration PUBLIC
"-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
<hibernate-configuration>
<session-factory>
<property name="hibernate.bytecode.use_reflection_optimizer">false</property>
<property name="hibernate.session_factory_name">HibernateSessionFactory</property>
<property name="hibernate.dialect">org.hibernate.dialect.Oracle9Dialect</property>
<property name="hibernate.connection.datasource">jdbc/MyDataSource</property>
<property name="hibernate.transaction.factory_class">
org.hibernate.transaction.JTATransactionFactory
</property>
<property name="hibernate.transaction.manager_lookup_class">
org.hibernate.transaction.WebSphereTransactionManagerLookup
</property>
<property name="hibernate.jndi.class">
com.ibm.websphere.naming.WsnInitialContextFactory
</property >
<property name="hibernate.current_session_context_class">jta</property>

<mapping resource="User.hbm.xml" />

</session-factory>
</hibernate-configuration>

Can anyone help me? Thanks!


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

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.