From: Kevin Grittner <kgrittn@ymail.com>
To: Hannes Erven <hannes@erven.at>
To: Dave Cramer <pg@fastcrypt.com>
Cc: List <pgsql-jdbc@postgresql.org>
Subject: Re: executeQuery() throws "Statement has been closed"
Date: Thu, 31 Jul 2014 13:02:14 -0700
Message-ID: <1406836934.94692.YahooMailNeo@web122305.mail.ne1.yahoo.com> (raw)
In-Reply-To: <53DA9A0B.6090404@erven.at>
References: <53DA04A9.2030101@erven.at>
<CADK3HH+9x3Ni8y=KzyUsdsLN5j3cZUcbvjMKC7mmt8o3zCTK3A@mail.gmail.com>
<53DA50FF.2040803@erven.at>
<CADK3HHKUi8DF_R4DAtMOjFEeO5z9aqxtULHZb9iQUqwWRBG3KA@mail.gmail.com>
<53DA9A0B.6090404@erven.at>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-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
--
Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-jdbc
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: kgrittn@ymail.com, hannes@erven.at, pg@fastcrypt.com
Subject: Re: executeQuery() throws "Statement has been closed"
In-Reply-To: <1406836934.94692.YahooMailNeo@web122305.mail.ne1.yahoo.com>
References: <53DA04A9.2030101@erven.at> <CADK3HH+9x3Ni8y=KzyUsdsLN5j3cZUcbvjMKC7mmt8o3zCTK3A@mail.gmail.com> <53DA50FF.2040803@erven.at> <CADK3HHKUi8DF_R4DAtMOjFEeO5z9aqxtULHZb9iQUqwWRBG3KA@mail.gmail.com> <53DA9A0B.6090404@erven.at> <1406836934.94692.YahooMailNeo@web122305.mail.ne1.yahoo.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