Re: "This ResultSet is closed" exception on a PreparedStatement getMetaData()

From: Kevin Grittner <kgrittn(at)ymail(dot)com>
To: Emmanuel GUITON <Emmanuel(dot)GUITON(at)intrinsec(dot)com>, "pgsql-jdbc(at)postgresql(dot)org" <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: "This ResultSet is closed" exception on a PreparedStatement getMetaData()
Date: 2013-12-19 13:59:24
Message-ID: 1387461564.37151.YahooMailNeo@web162901.mail.bf1.yahoo.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

Emmanuel GUITON <Emmanuel(dot)GUITON(at)intrinsec(dot)com> wrote:

> On a brand new PreparedStatement, I call the getMetaData() method
> without any problem. However, if I execute the query
> (executeQuery()) on this same statement, close the ResultSet and
> then calls again getMetaData() (still on the same
> PreparedStatement), getMetaData() throws a RuntimeException
> saying "This ResultSet is closed".
> I would expect to be able to get the metadata. Is that a bug in
> the JDBC driver ?

It sure looks like a bug to me.  Thanks for providing a clear,
self-contained test case.  (It would make a good addition to our
unit tests once the bug is fixed.)

--
Kevin Grittner
EDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Emmanuel GUITON 2013-12-19 14:06:52 Re: "This ResultSet is closed" exception on a PreparedStatement getMetaData()
Previous Message Dave Cramer 2013-12-19 13:35:55 Re: "This ResultSet is closed" exception on a PreparedStatement getMetaData()