users@glassfish.java.net

Re: GF2-v41 + JDK 1.6 + PostgreSQL 8.2 problems, as seen in issue 1522

From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
Date: Fri, 17 Aug 2007 09:53:54 +0530

On Thu, 2007-08-16 at 15:05 -0400, Ryan de Laplante wrote:
> Hi,
>
> I'm using Glassfish V2 b58 RC1, and JDK 1.6 update 2. I've tried to use
> the latest stable JDBC4 driver for Postgres 8.2 and experienced the same
> exceptions you saw. I switched to the JDBC3 driver, restarted the app
> server and experienced the other exception you described.
>
> I see a ticket was created for this issue:
> https://glassfish.dev.java.net/issues/show_bug.cgi?id=2779
>
> WORKAROUND:
>
> 1) Use DataSource of type "javax.sql.DataSource" instead of
> ConnectionPoolDataSource/XADataSource, if jdk 1.6 is mandatory
> 2) Use jdk 1.5 (since the driver is jdbc 3.0 compatible only), if
> XADataSource
> support is mandatory.
>
> Neither of those workarounds are good for me. I could use JDK 1.5 but I
> don't think I should have to.
>
> The fix was to add a new property to your datasource to indicate that
> you are using a JDBC3 datasource:
>
> name=JDBC30DataSource
> value=true
>
>
> Does that mean if I want to use any JDBC3 driver in GlassfishV2 on JDK
> 1.6, I have to add that property? Why not add a checkbox for that
> property directly below the Datasource Classname?
This is w.r.t Postgres. Others will work fine. eg: Derby
>
>
> Also, is the JDBC 4 issue on JDK 1.6 specific to postgres, or all JDBC4
> drivers?
This is because, postgres JDBC 4.0 implementation is not complete as
specified in http://jdbc.postgresql.org/download.html

      * JDK 1.6 - JDBC4. Support for JDBC4 methods is limited. The
        driver builds, but the majority of new methods are stubbed out.

Thanks,
-Jagadish

>
>
> Thanks,
> Ryan