I've used Hibernate Synchronizer to generate DAO's based on Spring's HibernateTemplate, and all Unit tests run against Derby work correctly, Integration tests with my UDB database using Jakarta Commons DBCP work correctly, and Jakarta Commons DBCP running in my local Websphere AppServer also works correctly. However, when I switch over to use a JNDI Datasource set up in my AppServer, many of my DAO calls that result in mutliple queries to make up the persistent object I get back fail, making it appear that my result set is getting closed before the code is done with it.
Is there anything special I need to set up in my Hibernate properties, when working with a JNDI datasource, that I'm failing to find in the Hibernate documentation and/or on other forum posts for this issue?
<prop key="hibernate.dialect">org.hibernate.dialect.DB2Dialect</prop>
<prop key="hibernate.show_sql">true</prop>
<prop key="hibernate.use_outer_join">true</prop>
<prop key="hibernate.connection.release_mode">auto</prop>
Hibernate version: 3.2.3
Full stack trace of any exception that occurs: SQL state [null]; error code [-99999]; [ibm][db2][jcc][10120][10898] Invalid operation: result set is closed.; nested exception is com.ibm.db2.jcc.c.SqlException: [ibm][db2][jcc][10120][10898] Invalid operation: result set is closed.
Name and version of the database you are using: UDB 8.1
The generated SQL (show_sql=true): Hibernate: select customerac0_.USERID as USERID22_, customerac0_.ACCOUNTNUMBER as ACCOUNTN2_22_ from ZIMBUBNK.CUSTOMERACCOUNTS customerac0_ where customerac0_.USERID='test00'
Hibernate: select account0_.ACCOUNTNUMBER as ACCOUNTN1_18_0_, account0_.BALANCE as BALANCE18_0_, account0_.ACCOUNTOWNERSHIPID as ACCOUNTO3_18_0_, account0_.ACCOUNTTYPEID as ACCOUNTT4_18_0_ from ZIMBUBNK.ACCOUNT account0_ where account0_.ACCOUNTNUMBER=?
Hibernate: select accountown0_.ACCOUNTOWNERSHIPTYPEID as ACCOUNTO1_20_0_, accountown0_.ACCOUNTOWNERSHIPTYPE as ACCOUNTO2_20_0_ from ZIMBUBNK.ACCOUNTOWNERSHIPTYPE accountown0_ where accountown0_.ACCOUNTOWNERSHIPTYPEID=?
Hibernate: select accounttyp0_.ACCOUNTTYPEID as ACCOUNTT1_21_0_, accounttyp0_.ACCOUNTTYPE as ACCOUNTT2_21_0_ from ZIMBUBNK.ACCOUNTTYPE accounttyp0_ where accounttyp0_.ACCOUNTTYPEID=?
|