pg.ddx.io  pgsql-jdbc@postgresql.org mailing list archive  
help / color / mirror / Atom feed
JDBC Driver in Glassfish 3.1.1
7+ messages / 4 participants
[nested] [flat]

* JDBC Driver in Glassfish 3.1.1
@ 2012-01-24 05:45  Petra Systems <petrasys@mindspring.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Petra Systems @ 2012-01-24 05:45 UTC (permalink / raw)
  To: pgsql-jdbc

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




^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: JDBC Driver in Glassfish 3.1.1
@ 2012-01-24 12:04  Dave Cramer <pg@fastcrypt.com>
  parent: Petra Systems <petrasys@mindspring.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Dave Cramer @ 2012-01-24 12:04 UTC (permalink / raw)
  To: Petra Systems <petrasys@mindspring.com>; +Cc: pgsql-jdbc

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 <petrasys@mindspring.com> 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
>
>
> --
> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgsql-jdbc



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: JDBC Driver in Glassfish 3.1.1
@ 2012-01-26 05:41  Petra Systems <petrasys@mindspring.com>
  parent: Dave Cramer <pg@fastcrypt.com>
  0 siblings, 1 reply; 7+ messages in thread

From: Petra Systems @ 2012-01-26 05:41 UTC (permalink / raw)
  To: Dave Cramer <pg@fastcrypt.com>; +Cc: pgsql-jdbc

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.

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<petrasys@mindspring.com>  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
>>
>>
>> --
>> Sent via pgsql-jdbc mailing list (pgsql-jdbc@postgresql.org)
>> To make changes to your subscription:
>> http://www.postgresql.org/mailpref/pgsql-jdbc

Attachments:

code_stacktrace.txt. (text/plain, 8.7K) download Code where the problem occurs. try // START OF JTA TRANSACTION { Object o=new InitialContext().lookup("UserTransaction"); ut=(UserTransaction) PortableRemoteObject.narrow(o,UserTransaction.class); // ut = sessioncontext.getUserTransaction(); Debug.print("Value of ut is: " +ut); ut.begin(); try { loginidcon = ds.getConnection("rich", "password"); } catch(SQLException sqlex) { Throwable se = new ServletException("database error"); se.initCause(sqlex); System.err.println("SQLException in LoginPwdServlet. "); System.err.println(sqlex.getMessage()); } catch(UndeclaredThrowableException ex) { System.err.println("This is the exception"); System.err.println(ex.getMessage()); Throwable unex = ex.getCause(); unex.printStackTrace(); System.err.println("And the target excepiton is ..."); System.err.println(((java.lang.reflect.InvocationTargetException)unex).getTargetException()); System.err.println(unex.getMessage()); } try { ps = loginidcon.prepareStatement("Select USERNAME,PASSWORD " + "from PASSWORDID where USERID = ?",ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE); ps.setString(1, user); results = ps.executeQuery(); if (!results.next()) { // A matching USERNAME is not found in database Authentication = new Integer(0); System.err.println("User " + user + " not found."); } else { // Only returns the first match. PassWord = results.getString("PASSWORD"); String CheckPass = PassWord.trim(); if (CheckPass.equals(Pass)) Authentication = new Integer(1); // passwords mathch else { Authentication = new Integer(0); // wrong password System.err.println("Password doesn't match for " + user); } } } catch(SQLException sqlex) { System.err.println("SQLException in LoginPwdServlet. "); System.err.println(sqlex.getMessage()); } Debug.print("Value of ut is: " +ut); ut.commit(); // COMMIT THE JTA TRANSACTION } catch (Exception ext) // USER TRANSACTION CATCH { Debug.print("Exception in JTA Transaction in LoginPwdServlet" +ext.getMessage()); ext.printStackTrace(); { try { Debug.print("Value of ut is: " +ut); if (ut != null) ut.rollback(); } catch (SystemException syex) { Debug.print("Rollback Exception: " +syex.getMessage()); throw new EJBException ("Rollback failed: " + syex.getMessage()); } throw new EJBException("Transaction failed: " + ext.getMessage()); } } Glassfish Logfile with the stacktrace that I think has the most info. Timestamp Jan 25, 2012 20:33:46.200 Log Level WARNING Logger javax.enterprise.system.stream.err Name-Value Pairs _ThreadID=18;_ThreadName=httpSSLWorkerThread-35084-0;_RequestID=bdbfd51a-0fdd-4c57-9eb9-d6b0bb14e46b; Record Number 1596 Message ID java.lang.reflect.InvocationTargetException at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java Complete Message 39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.postgresql.xa.PGXAConnection$ConnectionHandler.invoke(PGXAConnection.java:146) at $Proxy118.getClientInfo(Unknown Source) at com.sun.gjc.spi.jdbc40.ConnectionHolder40.getClientInfo(ConnectionHolder40.java:353) at com.sun.gjc.spi.jdbc40.ConnectionHolder40.init(ConnectionHolder40.java:81) at com.sun.gjc.spi.jdbc40.ConnectionHolder40.<init>(ConnectionHolder40.java:72) at com.sun.gjc.spi.jdbc40.Jdbc40ObjectsFactory.getConnection(Jdbc40ObjectsFactory.java:51) at com.sun.gjc.spi.ManagedConnection.getConnection(ManagedConnection.java:329) at com.sun.enterprise.resource.ConnectorAllocator.fillInResourceObjects(ConnectorAllocator.java:155) at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:517) at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:248) at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:176) at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:337) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:235) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:165) at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:158) at com.sun.gjc.spi.base.DataSource.getConnection(DataSource.java:130) at LoginPwdServlet.doPost(LoginPwdServlet.java:172) at javax.servlet.http.HttpServlet.service(HttpServlet.java:754) at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) at org.apache.catalina.core.ApplicationFilterChain.servletService(ApplicationFilterChain.java:427) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:315) at org.apache.catalina.core.StandardContextValve.invokeInternal(StandardContextValve.java:287) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:218) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:94) at com.sun.enterprise.web.PESessionLockingStandardPipeline.invoke(PESessionLockingStandardPipeline.java:98) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:222) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:166) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:648) at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:593) at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:587) at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1093) at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:291) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:666) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.doProcess(DefaultProcessorTask.java:597) at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:872) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:341) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:263) at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.doTask(DefaultReadTask.java:214) at com.sun.enterprise.web.portunif.PortUnificationPipeline$PUTask.doTask(PortUnificationPipeline.java:382) at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:264) at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:106) Caused by: java.lang.AbstractMethodError: org.postgresql.jdbc3.Jdbc3Connection.getClientInfo()Ljava/util/Properties; at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.postgresql.ds.jdbc23.AbstractJdbc23PooledConnection$ConnectionHandler.invoke(AbstractJdbc23PooledConnection.java:352) at $Proxy118.getClientInfo(Unknown Source) ... 51 more
^ permalink raw reply [nested|flat] 7+ messages in thread

* Re: JDBC Driver in Glassfish 3.1.1
@ 2012-01-26 07:59  Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
  parent: Petra Systems <petrasys@mindspring.com>
  0 siblings, 2 replies; 7+ messages in thread

From: Mikko Tiihonen @ 2012-01-26 07:59 UTC (permalink / raw)
  To: pgsql-jdbc

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<petrasys@mindspring.com> 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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: JDBC Driver in Glassfish 3.1.1
@ 2012-01-26 10:44  Radosław Smogura <rsmogura@softperience.eu>
  parent: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
  1 sibling, 1 reply; 7+ messages in thread

From: Radosław Smogura @ 2012-01-26 10:44 UTC (permalink / raw)
  To: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>; +Cc: pgsql-jdbc

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<petrasys@mindspring.com> 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



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: JDBC Driver in Glassfish 3.1.1
@ 2012-01-26 14:58  Petra Systems <petrasys@mindspring.com>
  parent: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
  1 sibling, 0 replies; 7+ messages in thread

From: Petra Systems @ 2012-01-26 14:58 UTC (permalink / raw)
  To: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>; +Cc: pgsql-jdbc

Inconsistent drivers was my concern also and I thought I got rid of that 
problem and did a clean and build on all modules.  I will check the 
actual jars and not just the data in Netbeans.  I have seen some strange 
things from Netbeans.

Regards,

Rich Rutkowski
Petra Systems
1-888-513-3026
petrasys@mindspring.com
rich@salepointdata.com


On 01/25/12 23:59, 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<petrasys@mindspring.com> 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
>



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* Re: JDBC Driver in Glassfish 3.1.1
@ 2012-01-26 22:30  Petra Systems <petrasys@mindspring.com>
  parent: Radosław Smogura <rsmogura@softperience.eu>
  0 siblings, 0 replies; 7+ messages in thread

From: Petra Systems @ 2012-01-26 22:30 UTC (permalink / raw)
  To: Radosław Smogura <rsmogura@softperience.eu>; +Cc: Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>; pgsql-jdbc

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<petrasys@mindspring.com> 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
>



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2012-01-26 22:30 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2012-01-24 05:45 JDBC Driver in Glassfish 3.1.1 Petra Systems <petrasys@mindspring.com>
2012-01-24 12:04 ` Dave Cramer <pg@fastcrypt.com>
2012-01-26 05:41   ` Petra Systems <petrasys@mindspring.com>
2012-01-26 07:59     ` Mikko Tiihonen <mikko.tiihonen@nitorcreations.com>
2012-01-26 10:44       ` Radosław Smogura <rsmogura@softperience.eu>
2012-01-26 22:30         ` Petra Systems <petrasys@mindspring.com>
2012-01-26 14:58       ` Petra Systems <petrasys@mindspring.com>

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