pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Paul Tomblin <ptomblin@gmail.com>
To: pgsql-jdbc@postgresql.org
Subject: Getting "This ResultSet is closed" exceptions
Date: Mon, 18 Feb 2008 09:19:37 -0500
Message-ID: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com> (raw)

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.



view thread (10+ messages)  latest in thread

Message-ID: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com>
Permalink:  ../8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com/
Also on:    postgresql.org/message-id/8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients from your mail client; the link fills in
  the headers below: reply via email
  Some clients, webmail especially, drop In-Reply-To and References from
  a link, and the reply then starts a new thread: use the mbox below.

  To: pgsql-jdbc@postgresql.org
  Cc: ptomblin@gmail.com
  Subject: Re: Getting "This ResultSet is closed" exceptions
  In-Reply-To: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com>
  References: <8efd35820802180619l352d9b0eta35788642a5fc4eb@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox