Re: double Statement.close() (on AIX 5.1)

From: Kris Jurka <books(at)ejurka(dot)com>
To: Victor Sergienko <singalen(at)mail(dot)ru>
Cc: <pgsql-jdbc(at)postgresql(dot)org>
Subject: Re: double Statement.close() (on AIX 5.1)
Date: 2004-02-24 13:22:22
Message-ID: Pine.LNX.4.33.0402240818100.31681-100000@leary.csoft.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-jdbc

On Tue, 24 Feb 2004, Victor Sergienko wrote:

> Gentlemen,
>
> I beg your pardon for incomplete problem description.
>
> On AIX 5.1, IBM Java 1.3.1 I'm using pg74jdbc3.jar dated 24.12.03.
> We have a flaw in a legacy program: it calls Statement.close() inside
> try() and in finally{} - thus, two times.
> On doing that, I get:
>
> java.sql.SQLException: Statement has been closed
>
> As JDK java.sql.Statement.close() documentation specifies, calling
> Statement.close() on already close()d statement should have no effect.

This is a problem in a number of other places (the pooled Connection and
the regular Statement) as well. I have applied a patch to both the 7.4
and development cvs repositories. Pre-built jar files are available here:
http://www.ejurka.com/pgsql/jars/

Also if you are using the 1.3 JDK you shouldn't be using the JDBC 3 jar.
This should only be used with the 1.4 JDK. You probably want the
jdbc2ee.jar file.

Thanks for the report.

Kris Jurka

In response to

Browse pgsql-jdbc by date

  From Date Subject
Next Message Pablo Velasquez Rivas 2004-02-24 13:42:25 Re: Postgres and JBuilderX on Linux
Previous Message Dave Cramer 2004-02-24 12:23:44 Re: double Statement.close() (on AIX 5.1)