darkgoon83 / log4jdbc-remix

Automatically exported from code.google.com/p/log4jdbc-remix
0 stars 0 forks source link

Result set gets closed - DB2 #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
While using it for DB2 driver(com.ibm.db2.jcc.DB2Driver), few queries failed to 
execute with following error
Caused by: com.ibm.db2.jcc.b.SqlException: [ibm][db2][jcc][10120][10898] 
Invalid operation: result set is closed.
.at com.ibm.db2.jcc.b.ih.ob(ih.java:3415)
.at com.ibm.db2.jcc.b.ih.p(ih.java:1351)
.at com.ibm.db2.jcc.b.ih.getMetaData(ih.java:1343)
.at 
net.sf.log4jdbc.DefaultResultSetCollector.getMetaDataIfNeeded(DefaultResultSetCo
llector.java:72)

What is the expected output? What do you see instead?
Not all the queries had this issue. only some of the queries failed.

What version of the product are you using? On what operating system?
log4jdbc-remix-0.2.7.jar, Unix

Please provide any additional information below.

Original issue reported on code.google.com by vanitha....@gmail.com on 6 Dec 2012 at 8:05

GoogleCodeExporter commented 8 years ago
Thanks vanitha.kct for reporting this, if you can find a fix for this then I 
would be happy to include your code. If you would like me to help I will need a 
small self contained example of the problem. - I think there is a free version 
of DB2 for non commercial non-production use that I could try it on.

Original comment by tim.azzo...@gmail.com on 10 Dec 2012 at 11:25

GoogleCodeExporter commented 8 years ago
Hello,

The issue is that the method "ResultSetSpy.close" closes the resultSet AND 
calls getMetaDataIfNeeded. As the resultSet is closed, the driver throws an 
exception.

See : 
http://docs.oracle.com/javase/6/docs/api/java/sql/ResultSet.html#getMetaData%28%
29

Original comment by nithril@gmail.com on 19 Jun 2013 at 10:36