-->
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: Distributed transaction error in hibernate
PostPosted: Tue Jul 22, 2008 4:45 am 
Newbie

Joined: Tue Jul 22, 2008 4:23 am
Posts: 1
hibernate3.jar

I am using hibernate in standalone application:

I am trying to get details from a "view" which gets data from another database and server group.
The error it displays is:

[b]The operation could not be performed because the OLE DB provider 'SQLOLEDB' was unable to begin a distributed transaction.[b]

the hibernate.xml file is

<hibernate-configuration>
<session-factory>

<!-- Database connection settings -->
<property name="show_sql">true</property>
<property name="hibernate.dialect">
org.hibernate.dialect.SQLServerDialect
</property>
<property name="hibernate.connection.driver_class">
com.microsoft.sqlserver.jdbc.SQLServerDriver
</property>
<property name="hibernate.connection.url">
jdbc:sqlserver://yyy:1433;selectMethod=direct;DatabaseName=zzz
</property>
<property name="hibernate.connection.username">
xxx </property>
<property name="hibernate.connection.password">
xxx </property>
<property name="transaction.factory_class">
org.hibernate.transaction.JDBCTransactionFactory
</property>
<property name="connection.provider_class">
org.hibernate.connection.C3P0ConnectionProvider
</property>
<property name="jta.UserTransaction">
java:comp/UserTransaction
</property>
<property name="c3p0.minPoolSize">
5
</property>

<!-- Mapping files -->
</session-factory>
</hibernate-configuration>

how to solve the above problem? any suggestions


Top
 Profile  
 
 Post subject:
PostPosted: Tue Jul 22, 2008 5:56 am 
Expert
Expert

Joined: Tue May 13, 2008 3:42 pm
Posts: 919
Location: Toronto & Ajax Ontario www.hibernatemadeeasy.com
Does the drive you are using support distributed transactions for two phase commit? Are the databases the same type or different?

_________________
Cameron McKenzie - Author of "Hibernate Made Easy" and "What is WebSphere?"
http://www.TheBookOnHibernate.com Check out my 'easy to follow' Hibernate & JPA Tutorials


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.