commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 15744] New: - Scaffold ResultSet used after statement is closed
Date Tue, 31 Dec 2002 20:43:23 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15744>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=15744

Scaffold ResultSet used after statement is closed

           Summary: Scaffold ResultSet used after statement is closed
           Product: Commons
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Sandbox
        AssignedTo: commons-dev@jakarta.apache.org
        ReportedBy: jespey@tallan.com


The executeQuery() method in org.apache.scaffold.sql.StatementUtils, a 
ResultSet is returned, and yet the Statement/PreparedStatement that is used to 
create the resultSet are closed before the method returns.  According to the 
javadocs, http://java.sun.com/j2se/1.4.1/docs/api/java/sql/ResultSet.html#close
(), a resultSet is automatically closed when the statement that generated it is 
closed.  This means that the method returns a closed resultset.  

This has caused errors for me in the getElement() method of the same class, as 
the resultSet is passed to another method to inflate a Collection.  The 
subsequent call to getMetaData() causes a SQLException.  

I am using the thin Oracle driver from classes12.zip to access an Oracle 8.1.7 
instance.  Perhaps on the platforms where this class has been used and tested, 
the jdbc driver incorrectly leaves a ResultSet despite the Statement having 
been closed?

--
To unsubscribe, e-mail:   <mailto:commons-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:commons-dev-help@jakarta.apache.org>


Mime
View raw message