From: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
---|---|
To: | Hannes Erven <hannes(at)erven(dot)at>, Dave Cramer <pg(at)fastcrypt(dot)com> |
Cc: | List <pgsql-jdbc(at)postgresql(dot)org> |
Subject: | Re: executeQuery() throws "Statement has been closed" |
Date: | 2014-07-31 20:02:14 |
Message-ID: | 1406836934.94692.YahooMailNeo@web122305.mail.ne1.yahoo.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Hannes Erven <hannes(at)erven(dot)at> wrote:
> As Kevin pointed out (thanks!), getMaxRows() is required by the
> spec to check whether the connection is still open.
It's more strict than that -- it is required to throw an exception
if the *Statement* has been closed. Of course, closing a
Connection will automatically close all Statement objects
associated with that connection, but the Statement object can, and
often is, closed before the Connection.
So, something is closing the Statement (directly or indirectly) and
then there is an attempt to use it. You need to figure out how
that happens.
--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Cramer | 2014-07-31 20:07:00 | Re: executeQuery() throws "Statement has been closed" |
Previous Message | Hannes Erven | 2014-07-31 19:33:31 | Re: executeQuery() throws "Statement has been closed" |