Re: executeQuery() throws "Statement has been closed" - Mailing list pgsql-jdbc

From Kevin Grittner
Subject Re: executeQuery() throws "Statement has been closed"
Date
Msg-id 1406836934.94692.YahooMailNeo@web122305.mail.ne1.yahoo.com
Whole thread Raw
In response to Re: executeQuery() throws "Statement has been closed"  (Hannes Erven <hannes@erven.at>)
List pgsql-jdbc
Hannes Erven <hannes@erven.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


pgsql-jdbc by date:

Previous
From: Hannes Erven
Date:
Subject: Re: executeQuery() throws "Statement has been closed"
Next
From: Dave Cramer
Date:
Subject: Re: executeQuery() throws "Statement has been closed"