Pantek Library
Hosting Provided By
CybrHost
High Speed Hosting

Re: [JDBC] Getting "This ResultSet is closed" exceptions

From: Andres Olarte <olarte.andres(at)gmail.com>
Date: Mon Feb 18 2008 - 13:51:52 EST


Another thread my close the result set if it's using the same statement. Or the thread may close the connection, but i think that would throw another exception. Other wise your code look right

On Feb 18, 2008 8:19 AM, Paul Tomblin <ptomblin@gmail.com> wrote:
> I have some code that works most of the time, but I left it running
> overnight and at 3am I got the "This ResultSet is closed" exception on
> the "while (rs.next())" line in the following code:
>
> ResultSet rs = getPerformancesOnVenueStmt.executeQuery();
>
> while(rs.next())
> {
> Performance performance = parseResultSet(null, null, rs);
> if (performance != null)
> retList.add(performance);
> }
> rs.close();
>
> The method "parseResultSet" does not close the result set, it just
> does the various "rs.get..." calls and creates a Performance object.
>
> Is it possible that another thread doing a commit on the same
> Connection could cause this?
>
> --
> For my assured failures and derelictions I ask pardon beforehand of my
> betters and my equals in my Calling here assembled, praying that in
> the hour of my temptations, weakness and weariness, the memory of this
> my Obligation and of the company before whom it was entered into, may
> return to me to aid, comfort and restrain.
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: if posting/reading through Usenet, please send an appropriate
> subscribe-nomail command to majordomo@postgresql.org so that your
> message can get through to the mailing list cleanly
>

---------------------------(end of broadcast)---------------------------
TIP 7: You can help support the PostgreSQL project by donating at
                
http://www.postgresql.org/about/donate
Received on Mon Feb 18 13:53:19 2008

This archive was generated by hypermail 2.1.8 : Wed Jun 18 2008 - 23:44:41 EDT


Contact Us  Legal Notices  Order Services Online 
Pantek Home  Privacy Policy  IT news  Site Map  Pantek Library