-->
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.  [ 3 posts ] 
Author Message
 Post subject: Switching between JDBC and Connection Pool Datasource
PostPosted: Mon Jan 25, 2010 5:28 am 
Newbie

Joined: Mon Jan 25, 2010 5:20 am
Posts: 2
I have problems while switching between JDBC and Connection Pool Datasource in my
Java aplication with the use of Hibernate.
With the JDBC everything works fine (select, insert). When I define in hibernate.cfg.xml to
use Connection Pool Datasource (define od WAS) I get the next error:

<soapenv:Fault>
<faultcode>soapenv:Server.generalException</faultcode>
<faultstring>javax.transaction.TransactionRolledbackException: ; nested exception is:
com.ibm.websphere.csi.CSITransactionRolledbackException:
</faultstring>
</soapenv:Fault>

The content of hibernate.cfg.xml is :

!-- JDBC datasource -->
<property name="connection.username">mkt</property>
<property name="connection.url">jdbc:db2://smreka.mkz-lj.si:50001/LIBRTEST</property>
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="myeclipse.connection.profile">Libris2_DB</property>
<property name="connection.password">OPds44ff</property>
<property name="connection.driver_class">com.ibm.db2.jcc.DB2Driver</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="connection.pool_size">20</property>
<property name="hibernate.format_sql">false</property>
<property name="hibernate.show_sql">false</property>


<!-- Connection Pool Datasourcedatasource -->
<property name="dialect">org.hibernate.dialect.DB2Dialect</property>
<property name="connection.datasource">java:comp/env/jdbc/librisReference</property>
<property name="hibernate.current_session_context_class">thread</property>
<property name="hibernate.format_sql">false</property>
<property name="hibernate.show_sql">false</property>


Thanks for help
Mitja


Top
 Profile  
 
 Post subject: Re: Switching between JDBC and Connection Pool Datasource
PostPosted: Fri Feb 12, 2010 11:02 am 
Regular
Regular

Joined: Thu May 07, 2009 5:56 am
Posts: 94
Location: Toulouse, France
1. what version of WAS you are using?
2. why you get in SystemOut.log and SystemErr.log?
3. are you sure that hibernate make do connect to java:comp/env/jdbc/librisReference? Did you try set <property name="connection.datasource">jdbc/librisReference</property> ?

_________________
everything should be made as simple as possible, but not simpler (AE)


Top
 Profile  
 
 Post subject: Re: Switching between JDBC and Connection Pool Datasource
PostPosted: Fri Feb 12, 2010 2:17 pm 
Newbie

Joined: Mon Jan 25, 2010 5:20 am
Posts: 2
I solved the problem !

Thank you


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 3 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.