-->
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: Websphere Transaction Manager Setup
PostPosted: Tue Sep 14, 2004 10:49 am 
Newbie

Joined: Tue Sep 14, 2004 10:22 am
Posts: 1
Greetings !
I was trying to set up the websphere connection pool and the transaction manager but for some reason it throws me an error. I guess Im following everything in the doco. but still cant seem to make it work. If I do not have the following settings(marked between !-- and --) then, everything seems to be working fine which means my JNDI for connection.datasource property is set up right. Somebody please help me figure this thing out.

<!--
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property>
-->

Hibernate version: 2


Configuration cfg = new Configuration();
cfg.configure("/test.cfg.xml");
factory = cfg.buildSessionFactory();


<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-2.0.dtd">

<hibernate-configuration>

<session-factory>
<property name="connection.datasource">jdbc/test</property>
<property name="transaction.factory_class">net.sf.hibernate.transaction.JTATransactionFactory</property>
<property name="transaction.manager_lookup_class">net.sf.hibernate.transaction.WebSphereTransactionManagerLookup</property>

<property name="dialect">net.sf.hibernate.dialect.OracleDialect</property>
<property name="jdbc.use_streams_for_binary">true</property>
<property name="use_outer_join">true</property>
<property name="hibernate.statement_cache.size">25</property>
<property name="hibernate.jdbc.batch_size">0</property>
<property name="hibernate.jdbc.use_streams_for_binary">true</property>
<property name="hibernate.show_sql">true</property>

<mapping resource="test/Cat.hbm.xml"/>

</session-factory>

</hibernate-configuration>



Full stack trace of any exception that occurs:

net.sf.hibernate.HibernateException: Could not obtain WebSphere JTSXA instance
at net.sf.hibernate.transaction.WebSphereTransactionManagerLookup.getTransactionManager(WebSphereTransactionManagerLookup.java:42)
at net.sf.hibernate.transaction.JTATransactionFactory.configure(JTATransactionFactory.java:48)
at net.sf.hibernate.transaction.TransactionFactoryFactory.buildTransactionFactory(TransactionFactoryFactory.java:48)
at net.sf.hibernate.cfg.SettingsFactory.buildSettings(SettingsFactory.java:65)
at net.sf.hibernate.cfg.Configuration.buildSettings(Configuration.java:1091)
at net.sf.hibernate.cfg.Configuration.buildSessionFactory(Configuration.java:737)

Caused by: java.lang.ClassNotFoundException: com.ibm.ejs.jts.jta.JTSXA
at com.ibm.ws.classloader.CompoundClassLoader.findClass(CompoundClassLoader.java(Compiled Code))
at com.ibm.ws.classloader.CompoundClassLoader.loadClass(CompoundClassLoader.java(Compiled Code))
at java.lang.ClassLoader.loadClass(ClassLoader.java(Compiled Code))
at java.lang.Class.forName1(Native Method)
at java.lang.Class.forName(Class.java(Compiled Code))
at net.sf.hibernate.transaction.WebSphereTransactionManagerLookup.getTransactionManager(WebSphereTransactionManagerLookup.java:34)
... 60 more






Name and version of the database you are using: Oracle8.1.6


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.