From: Kris Jurka <books@ejurka.com>
To: Thor-Michael Støre <thor-michael.store@webvelocity.no>
Cc: pgsql-jdbc@postgresql.org
Subject: Re: Pg JDBC 3 driver, JDK 1.6, Glassfish v2 incompatability
Date: Mon, 9 Apr 2007 12:04:59 -0400 (EDT)
Message-ID: <Pine.BSO.4.64.0704091159320.13571@leary.csoft.net> (raw)
In-Reply-To: <BF48396AA1F0CD4EA23C6093A992E4DDE38B95@ex-srv-02.exchangemail.no>
References: <BF48396AA1F0CD4EA23C6093A992E4DDE38B95@ex-srv-02.exchangemail.no>
On Mon, 9 Apr 2007, Thor-Michael Støre wrote:
> CAUSE: On further investigation, Postgres jdbc driver's Connection from
> ConnectionPoolDataSource/XADataSource is a proxy of java.sql.Connection,
> This proxy, in jdk 1.6 will list all methods of jdbc 4.0 connection
> (even though the datasource is only jdbc 30) This makes GlassFish to
> decide (during initialization of datasource) that it is a jdbc 4.0
> compatible connection and calls jdbc 4.0 methods of Connection, causing
> AbstractMethodError thrown.
>
The real problem is that you are using the JDBC3 instead of JDBC4 driver
with a 1.6 JVM. I don't believe that either PG or Glassfish are at fault.
When the JDBC3 driver was built (under a 1.4/1.5) JDK it does implement
all java.sql.Connection methods so it is fine to proxy for it. When run
under a 1.6 JVM the proxying suddenly claims to implement more methods
which Glassfish reasonably tries to use. So I think it's really a
configuration error on your part.
Kris Jurka
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: books@ejurka.com, thor-michael.store@webvelocity.no
Subject: Re: Pg JDBC 3 driver, JDK 1.6, Glassfish v2 incompatability
In-Reply-To: <Pine.BSO.4.64.0704091159320.13571@leary.csoft.net>
References: <BF48396AA1F0CD4EA23C6093A992E4DDE38B95@ex-srv-02.exchangemail.no> <Pine.BSO.4.64.0704091159320.13571@leary.csoft.net>
* 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