Re: executeQuery() throws "Statement has been closed"

Поиск
Список
Период
Сортировка
От Kevin Grittner
Тема Re: executeQuery() throws "Statement has been closed"
Дата
Msg-id 1406836934.94692.YahooMailNeo@web122305.mail.ne1.yahoo.com
обсуждение исходный текст
Ответ на Re: executeQuery() throws "Statement has been closed"  (Hannes Erven <hannes@erven.at>)
Список 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 по дате отправления:

Предыдущее
От: Hannes Erven
Дата:
Сообщение: Re: executeQuery() throws "Statement has been closed"
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: executeQuery() throws "Statement has been closed"