If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > DB2 > DB2 & Spring

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 08-01-07, 06:32
dia1212 dia1212 is offline
Registered User
 
Join Date: Aug 2007
Posts: 1
DB2 & Spring

Hi,

I'm trying to implement DB2 Support in our application.
The database access is based on Spring Framework and I get the exception:

org.springframework.jdbc.UncategorizedSQLException : PreparedStatementCallback; uncategorized SQLException for SQL [SELECT TXID, STATUS FROM CBPR_PRINCIPAL WHERE ID=?]; 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.
Caused by:
com.ibm.db2.jcc.c.SqlException: [ibm][db2][jcc][10120][10898] Invalid operation: result set is closed.
at com.ibm.db2.jcc.c.wf.mb(wf.java:3193)
at com.ibm.db2.jcc.c.wf.c(wf.java:247)
at com.ibm.db2.jcc.c.wf.next(wf.java:234)
at org.springframework.jdbc.core.RowMapperResultSetEx tractor.extractData(RowMapperResultSetExtractor.ja va:91)
at org.springframework.jdbc.core.JdbcTemplate$1.doInP reparedStatement(JdbcTemplate.java:599)
at org.springframework.jdbc.core.JdbcTemplate.execute (JdbcTemplate.java:537)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:587)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:612)
at org.springframework.jdbc.core.JdbcTemplate.query(J dbcTemplate.java:644)
at org.springframework.jdbc.object.SqlQuery.execute(S qlQuery.java:112)
at org.springframework.jdbc.object.SqlQuery.findObjec t(SqlQuery.java:252)
at org.springframework.jdbc.object.SqlQuery.findObjec t(SqlQuery.java:298)
at org.springframework.jdbc.object.SqlQuery.findObjec t(SqlQuery.java:305)

Our application works on Oracle and MySQL and the database access is handled by Spring, therefore I guess it is a problem with the JDBC driver.
I also think, this exception is only thrown by selects with an "ID query" (Select with one record as result).
Updates and Inserts work fine on DB2.

The JDBC driver is the latest version downloaded from the IBM Download Page:

getDriverVersion= 3.1.57
getDriverMajorVersion= 3
getDriverMinorVersion= 3.1.57
getDriverName= IBM DB2 JDBC Universal Driver Architecture
getDatabaseProductName= DB2/LINUX

The exact database version is:

[db2cms@xxx db2dump]$ db2level
DB21085I Instance "db2cms" uses "32" bits and DB2 code release "SQL09012" with
level identifier "01030107".
Informational tokens are "DB2 v9.1.0.2", "special_17369", "MI00183_17369", and
Fix Pack "2".
Product is installed at "/opt/IBM/db2/V9.1".

Does anybody have an idea?

Thanks in advance,
Claudia

Last edited by dia1212; 08-02-07 at 06:32.
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On