Re: double Statement.close() (on AIX 5.1) - Mailing list pgsql-jdbc

From Kris Jurka
Subject Re: double Statement.close() (on AIX 5.1)
Date
Msg-id Pine.LNX.4.33.0402240818100.31681-100000@leary.csoft.net
Whole thread Raw
In response to double Statement.close() (on AIX 5.1)  (Victor Sergienko <singalen@mail.ru>)
List 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


pgsql-jdbc by date:

Previous
From: Dave Cramer
Date:
Subject: Re: double Statement.close() (on AIX 5.1)
Next
From: Pablo Velasquez Rivas
Date:
Subject: Re: Postgres and JBuilderX on Linux