Received: from localhost (maia-4.hub.org [200.46.204.183]) by postgresql.org (Postfix) with ESMTP id 73BD49FA667 for ; Mon, 9 Apr 2007 13:05:14 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.204.183]) (amavisd-maia, port 10024) with ESMTP id 77828-06 for ; Mon, 9 Apr 2007 13:05:01 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey-1.7.4 Received: from mail63.csoft.net (leary.csoft.net [205.205.214.5]) by postgresql.org (Postfix) with SMTP id D6AFB9FA4BB for ; Mon, 9 Apr 2007 13:05:00 -0300 (ADT) Received: (qmail 26135 invoked by uid 1112); 9 Apr 2007 16:04:59 -0000 Date: Mon, 9 Apr 2007 12:04:59 -0400 (EDT) From: Kris Jurka X-X-Sender: books@leary.csoft.net To: =?iso-8859-1?Q?Thor-Michael_St=F8re?= cc: pgsql-jdbc@postgresql.org Subject: Re: Pg JDBC 3 driver, JDK 1.6, Glassfish v2 incompatability In-Reply-To: Message-ID: References: MIME-Version: 1.0 X-Virus-Scanned: Maia Mailguard 1.0.1 Content-Type: TEXT/PLAIN; charset=X-UNKNOWN; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE X-Archive-Number: 200704/9 X-Sequence-Number: 16858 On Mon, 9 Apr 2007, Thor-Michael St=F8re wrote: > CAUSE: On further investigation, Postgres jdbc driver's Connection from= =20 > ConnectionPoolDataSource/XADataSource is a proxy of java.sql.Connection,= =20 > This proxy, in jdk 1.6 will list all methods of jdbc 4.0 connection=20 > (even though the datasource is only jdbc 30) This makes GlassFish to=20 > decide (during initialization of datasource) that it is a jdbc 4.0=20 > compatible connection and calls jdbc 4.0 methods of Connection, causing= =20 > AbstractMethodError thrown. > The real problem is that you are using the JDBC3 instead of JDBC4 driver=20 with a 1.6 JVM. I don't believe that either PG or Glassfish are at fault.= =20 When the JDBC3 driver was built (under a 1.4/1.5) JDK it does implement=20 all java.sql.Connection methods so it is fine to proxy for it. When run=20 under a 1.6 JVM the proxying suddenly claims to implement more methods=20 which Glassfish reasonably tries to use. So I think it's really a=20 configuration error on your part. Kris Jurka=