Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id 0696B1F07121 for ; Thu, 26 Jan 2012 18:28:15 -0400 (AST) Received: from elasmtp-curtail.atl.sa.earthlink.net ([209.86.89.64]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RqXna-0002M2-PU for pgsql-jdbc@postgresql.org; Thu, 26 Jan 2012 22:28:15 +0000 DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=dk20050327; d=mindspring.com; b=BDzfOi7BvHSFQv43rCqE2Sd0UZyM9layJauiGw+YmKxyYS/tBa1pPiJJZSPb/9UB; h=Received:Message-ID:Date:From:User-Agent:MIME-Version:To:CC:Subject:References:In-Reply-To:Content-Type:Content-Transfer-Encoding:X-ELNK-Trace:X-Originating-IP; Received: from [71.246.42.79] (helo=[10.0.0.100]) by elasmtp-curtail.atl.sa.earthlink.net with esmtpa (Exim 4.67) (envelope-from ) id 1RqXnK-0008SW-AO; Thu, 26 Jan 2012 17:27:50 -0500 Message-ID: <4F21D3F3.3090901@mindspring.com> Date: Thu, 26 Jan 2012 14:30:11 -0800 From: Petra Systems User-Agent: Mozilla/5.0 (X11; U; SunOS i86pc; en-US; rv:1.9.2.13) Gecko/20101209 Thunderbird/3.1.7 MIME-Version: 1.0 To: =?UTF-8?B?UmFkb3PFgmF3IFNtb2d1cmE=?= CC: Mikko Tiihonen , pgsql-jdbc@postgresql.org Subject: Re: JDBC Driver in Glassfish 3.1.1 References: <4F1E4572.9030801@mindspring.com> <4F20E785.8070907@mindspring.com> <4F2107F6.6080605@nitorcreations.com> <76922b4ad78c8b199bd1918455e28b29@mail.softperience.eu> In-Reply-To: <76922b4ad78c8b199bd1918455e28b29@mail.softperience.eu> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ELNK-Trace: d4a33e166a8dfa109c7f779228e2f6aeda0071232e20db4d1727fe6c15a3c5fb4777fb3d8facd3b7350badd9bab72f9c350badd9bab72f9c350badd9bab72f9c X-Originating-IP: 71.246.42.79 X-Pg-Spam-Score: -2.0 (--) X-Archive-Number: 201201/107 X-Sequence-Number: 22647 Hi: I moved from the 8.2-512.JDBC4 driver to the 9.1-901.JDBC4 driver and it now appears to work with Glassfish 2.1.1. Thanks for the help. Regards, Rich Rutkowski Petra Systems 1-888-513-3026 petrasys@mindspring.com rich@salepointdata.com On 01/26/12 02:44, Radosław Smogura wrote: > On Thu, 26 Jan 2012 09:59:50 +0200, Mikko Tiihonen wrote: >> On 01/26/2012 07:41 AM, Petra Systems wrote: >>> Hi: >>> Below is the environment and a definition of the problem and other >>> details. If this is not the proper location to post please advise. >>> >>> 1) Application Server is Glassfish 2.1.1 (problem was also observed >>> with 3.1.1) running on a Solaris 10 x86 (AMD) with a ZFS file system. >>> >>> 2) Database Server is Solaris 10 x86 (AMD) running postgres 8.2 with >>> a UFS file system. >>> >>> 3) The ear file consists of an Applet, a war file and an ejb jar. >>> All have been built with Netbeans 7.1 using JDK 1.6. The application >>> run environment is listed >>> by Netbeans as EE 6. There is something strange in that the EE >>> environment for the war file is listed by Netbeans as J2EE 1.4. >>> >>> 4) This application has been running for years with the postgres >>> database on the same server as Glassfish. >>> >>> 5) When the database is remote the jndi lookup works but the >>> ds.connection(userid,password) fails. The connection pool is setup >>> with an XADatasource and ping is >>> successful. Also, Netbeans can connect to the remote database and so >>> can pgAdmin. >>> >>> 6) The exception thrown is not an SQLException and I added some more >>> catch statements to try to unwind the exceptions. See code and stack >>> trace attached. >>> >>> 7) The application is using EJB 2.1 technology with Bean Managed >>> Persistence which currently is our preferred approach. The inability >>> to make the connection >>> occurs in both servlets and entity beans. The jndi lookup works but >>> the ds.connect does not. >>> >>> Any help would be appreciated. >> >> What is your jdbc driver version (in the jar/war/ear)? >> >> The lowest exception seems to be: >> java.lang.AbstractMethodError: >> >> org.postgresql.jdbc3.Jdbc3Connection.getClientInfo()Ljava/util/Properties >> >> that the com.sun.gjc.spi.jdbc40.ConnectionHolder40.init is trying to >> invoke. >> >> The getClientInfo was only introduced in jdbc4. >> So my guess is that you have jdbc3 driver and you have configured a >> jdbc4 pooling on the server. >> >> If you upgrade to latest jdbc4 driver does it work? >> >> >>> Regards, >>> >>> Rich Rutkowski >>> Petra Systems >>> 1-888-513-3026 >>> petrasys@mindspring.com >>> rich@salepointdata.com >>> >>> >>> On 01/24/12 04:04, Dave Cramer wrote: >>>> There should be no reason it would not work. >>>> >>>> Dave Cramer >>>> >>>> dave.cramer(at)credativ(dot)ca >>>> http://www.credativ.ca >>>> >>>> >>>> >>>> On Tue, Jan 24, 2012 at 12:45 AM, Petra >>>> Systems wrote: >>>>> Hi: >>>>> Before I spend your valuable time describing a recent problem I would >>>>> like to know if postgresql-8.2-512.jdbc4.jar or >>>>> postgresql-9.0-801.jdbc3.jar >>>>> work with Glassfish 2.1.1 when the postgres data base (8.2) is >>>>> remote with >>>>> respect to the Glassfish 2.1.1 Application Server. >>>>> >>>>> Regards, >>>>> >>>>> -- >>>>> Rich Rutkowski >>>>> Petra Systems >>>>> 1-888-513-3026 >>>>> petrasys@mindspring.com >>>>> rich@salepointdata.com > > I think this is old bug, and it's fixed (I don't see it). In first > implementations of JDBC4 there was no this method or unimplemented > exception has been thrown. Simple fix was to return empty result. Btw, > for new Glassfish you need JDBC4 driver, GF do not allow to set JDBC > version. > > Actually, I use original PG driver, and driver based on it with > glassfish there is no problem with this method. > > Regards, > Radek >