eeichinger / log4jdbc-log4j2

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

java.sql.SQLException: Closed Resultset: getMetaData #4

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Execute and close a resultSet

What is the expected output? What do you see instead?
N/A

What version of the product are you using? On what operating system?
1.12 JDBC 4
Oracle 10g Driver

Please provide any additional information below.

"ResultSetSpy.close" closes the resultSet AND calls reportReturn which calls 
resultSet.getMetaData. As the resultSet is closed, the driver throws an 
exception

Original issue reported on code.google.com by nithril@gmail.com on 19 Jun 2013 at 10:54

GoogleCodeExporter commented 9 years ago
Relate to http://code.google.com/p/log4jdbc-remix/issues/detail?id=16

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

GoogleCodeExporter commented 9 years ago

Original comment by frederic...@gmail.com on 19 Jun 2013 at 12:21

GoogleCodeExporter commented 9 years ago
Thank you for reporting this issue. The problem has been fixed and a unit test 
added, see revision r160 and release 1.13. Please let me know if it corrects 
your problem.

The problem was appearing when the DefaultResultSetCollector didn't have a 
chance to get a ResultSetMetaData before the ResultSet was closed (it was 
usually obtaining it before closing through calls to the next() method). 

Related to your message on the log4jdbc-remix tracker, I think this issue is 
specific to log4jdbc-log4j2, log4jdbc-remix does not do anything when close() 
is called in the ResultSetCollector. 

Original comment by frederic...@gmail.com on 19 Jun 2013 at 5:59

GoogleCodeExporter commented 9 years ago
Thanks for your quick reply and fix! I will try tomorrow. 

Original comment by nithril@gmail.com on 19 Jun 2013 at 7:07