-----Original Message-----
From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
To: dev_at_glassfish.dev.java.net
Date: Thu, 14 Dec 2006 16:10:47 +0530
Subject: Re: Re[2]: Glassfish, JDK6 and JDBC4
>
> On Thu, 2006-12-14 at 12:58 +0300, Dmitry Mozheyko wrote:
> >
> > -----Original Message-----
> > From: Jagadish Prasath Ramu <Jagadish.Ramu_at_Sun.COM>
> > To: dev_at_glassfish.dev.java.net
> > Date: Thu, 14 Dec 2006 13:40:48 +0530
> > Subject: Re: Glassfish, JDK6 and JDBC4
> >
> > >
> > > Hi,
> > > I assume that you want to use JDK 6 and Postgresql (JDBC 4) driver
> > > purposefully.
> > > GlassFish, when JDBC40Connection is used, tries to get clientInfo for
> > > book keeping. Since Postgresql driver does not implement "clientInfo()",
> > > we see this exception. Since this exception is being logged and not
> > > thrown to the application, it should be fine.
> > >
> > > Can you please confirm that the application works fine ?
> >
> > Yes, but i don't like exceptions stacktraces in my log files every user logon.
> If you are using postgres-jdbc-40 driver, I suspect there is a proper
> workaround [you can turn log level of resource-adapter to SEVERE].
> We might see this exception till they implement the feature.
>
> Postgres doesn't seem to support JDBC 40 completely.
> >From http://jdbc.postgresql.org/download.html - Following details are
> found.
> "JDK 1.6 - JDBC4. Support for JDBC4 methods is virtually non-existent.
> The driver builds, but new methods are stubbed out."
>
> If you are OK with using JDK 6 and only JDBC 3 features (Postgres JDBC 3
> driver), we wont hit this issue. (from GF v2 b28)
old Postgre driver JDBC don't works with JDK6:
[#|2006-12-14T14:30:38.842+0300|WARNING|sun-appserver-ee9.1|javax.enterprise.system.container.web|_ThreadID=11;_ThreadName=httpSSLWorkerThread-8181-0;_RequestID=5837c171-dabe-4853-8e4c-f77529dab3a3;|Web login failed: Login failed: javax.security.auth.login.LoginException: 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.common.PooledConnectionImpl$ConnectionHandler.invoke(PooledConnectionImpl.java:360)
at $Proxy44.getClientInfo(Unknown Source)
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.getClientInfo(ConnectionHolder40.java:352)
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.init(ConnectionHolder40.java:80)
at com.sun.gjc.spi.jdbc40.ConnectionHolder40.<init>(ConnectionHolder40.java:71)
at com.sun.gjc.spi.jdbc40.Jdbc40ObjectsFactory.getConnection(Jdbc40ObjectsFactory.java:32)
at com.sun.gjc.spi.ManagedConnection.getConnection(ManagedConnection.java:329)
at com.sun.enterprise.resource.LocalTxConnectorAllocator.fillInResourceObjects(LocalTxConnectorAllocator.java:86)
at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:489)
at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:235)
at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:163)
at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:312)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:176)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:152)
at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateNonTxConnection(ConnectionManagerImpl.java:135)
at com.sun.gjc.spi.base.DataSource.getNonTxConnection(DataSource.java:160)
at mozheyko.dmitry.DBHelper.<init>(DBHelper.java:50)
at mozheyko.dmitry.DBRealm.getDBHelper(DBRealm.java:47)
at mozheyko.dmitry.DBLoginModule.authenticateUser(DBLoginModule.java:23)
at com.sun.appserv.security.AppservPasswordLoginModule.login(AppservPasswordLoginModule.java:171)
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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
at java.security.AccessController.doPrivileged(Native Method)
at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
at com.sun.enterprise.security.auth.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:284)
at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:159)
at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:112)
at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:448)
at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:388)
at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238)
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:538)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:186)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1032)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1032)
at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:250)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:549)
at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:397)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:210)
at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
|#]
>
> Thanks,
> -Jagadish
> >
> > >
> > > Thanks,
> > > -Jagadish
> > >
> > > On Thu, 2006-12-14 at 10:40 +0300, Dmitry Mozheyko wrote:
> > > > Hello all.
> > > >
> > > > I use glassfish v2 build b27, postgresql 8.2, postgresql-8.2-504.jdbc4.jar(JDBC4 Driver)
> > > >
> > > > After JDK updating to 6 version my code:
> > > >
> > > > com.sun.appserv.jdbc.DataSource ds = (com.sun.appserv.jdbc.DataSource)context.lookup("dataSource");
> > > >
> > > > Connection connection = ds.getConnection();
> > > >
> > > > throws Exception:
> > > >
> > > > [#|2006-12-14T10:01:39.576+0300|WARNING|sun-appserver-ee9.1|javax.enterprise.resource.resourceadapter|_ThreadID=15;_ThreadName=httpSSLWorkerThread-8181-1;_RequestID=a2abed25-1eac-4d3d-8bb6-931b1911d7ab;|RAR7114: Unable to get ClientInfo for connection
> > > > org.postgresql.util.PSQLException: Method org.postgresql.jdbc4.Jdbc4Connection.getClientInfo() is not yet implemented.
> > > > at org.postgresql.Driver.notImplemented(Driver.java:728)
> > > > at org.postgresql.jdbc4.AbstractJdbc4Connection.getClientInfo(AbstractJdbc4Connection.java:73)
> > > > at org.postgresql.jdbc4.Jdbc4Connection.getClientInfo(Jdbc4Connection.java:21)
> > > > 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:357)
> > > > at $Proxy42.getClientInfo(Unknown Source)
> > > > at com.sun.gjc.spi.jdbc40.ConnectionHolder40.getClientInfo(ConnectionHolder40.java:352)
> > > > at com.sun.gjc.spi.jdbc40.ConnectionHolder40.init(ConnectionHolder40.java:80)
> > > > at com.sun.gjc.spi.jdbc40.ConnectionHolder40.<init>(ConnectionHolder40.java:71)
> > > > at com.sun.gjc.spi.jdbc40.Jdbc40ObjectsFactory.getConnection(Jdbc40ObjectsFactory.java:32)
> > > > at com.sun.gjc.spi.ManagedConnection.getConnection(ManagedConnection.java:329)
> > > > at com.sun.enterprise.resource.LocalTxConnectorAllocator.fillInResourceObjects(LocalTxConnectorAllocator.java:86)
> > > > at com.sun.enterprise.resource.AbstractResourcePool.getResource(AbstractResourcePool.java:489)
> > > > at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:235)
> > > > at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:163)
> > > > at com.sun.enterprise.connectors.ConnectionManagerImpl.internalGetConnection(ConnectionManagerImpl.java:312)
> > > > at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:176)
> > > > at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConnection(ConnectionManagerImpl.java:152)
> > > > at com.sun.enterprise.connectors.ConnectionManagerImpl.allocateNonTxConnection(ConnectionManagerImpl.java:135)
> > > > at com.sun.gjc.spi.base.DataSource.getNonTxConnection(DataSource.java:160)
> > > > at mozheyko.dmitry.DBHelper.<init>(DBHelper.java:50)
> > > > at mozheyko.dmitry.DBRealm.getDBHelper(DBRealm.java:47)
> > > > at mozheyko.dmitry.DBLoginModule.authenticateUser(DBLoginModule.java:23)
> > > > at com.sun.appserv.security.AppservPasswordLoginModule.login(AppservPasswordLoginModule.java:171)
> > > > 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 javax.security.auth.login.LoginContext.invoke(LoginContext.java:769)
> > > > at javax.security.auth.login.LoginContext.access$000(LoginContext.java:186)
> > > > at javax.security.auth.login.LoginContext$4.run(LoginContext.java:683)
> > > > at java.security.AccessController.doPrivileged(Native Method)
> > > > at javax.security.auth.login.LoginContext.invokePriv(LoginContext.java:680)
> > > > at javax.security.auth.login.LoginContext.login(LoginContext.java:579)
> > > > at com.sun.enterprise.security.auth.LoginContextDriver.doPasswordLogin(LoginContextDriver.java:284)
> > > > at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:159)
> > > > at com.sun.enterprise.security.auth.LoginContextDriver.login(LoginContextDriver.java:112)
> > > > at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:448)
> > > > at com.sun.web.security.RealmAdapter.authenticate(RealmAdapter.java:388)
> > > > at org.apache.catalina.authenticator.FormAuthenticator.authenticate(FormAuthenticator.java:238)
> > > > at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:538)
> > > > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:577)
> > > > at com.sun.enterprise.web.WebPipeline.invoke(WebPipeline.java:73)
> > > > at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:186)
> > > > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > > > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> > > > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1032)
> > > > at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:137)
> > > > at org.apache.catalina.core.StandardPipeline.doInvoke(StandardPipeline.java:586)
> > > > at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:556)
> > > > at org.apache.catalina.core.ContainerBase.invoke(ContainerBase.java:1032)
> > > > at org.apache.coyote.tomcat5.CoyoteAdapter.service(CoyoteAdapter.java:250)
> > > > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.invokeAdapter(DefaultProcessorTask.java:618)
> > > > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.processNonBlocked(DefaultProcessorTask.java:549)
> > > > at com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.process(DefaultProcessorTask.java:790)
> > > > at com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeProcessorTask(DefaultReadTask.java:326)
> > > > at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.process(SSLReadTask.java:397)
> > > > at com.sun.enterprise.web.connector.grizzly.ssl.SSLReadTask.doTask(SSLReadTask.java:210)
> > > > at com.sun.enterprise.web.connector.grizzly.TaskBase.run(TaskBase.java:252)
> > > > at com.sun.enterprise.web.connector.grizzly.ssl.SSLWorkerThread.run(SSLWorkerThread.java:93)
> > > > |#]
> > > >
> > > >
> > > > How i can fix it?
> > > >
> > > > ---------------------------------------------------------------------
> > > > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> > > > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
> > > >
> > >
> > > ---------------------------------------------------------------------
> > > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> > > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
> > >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> > For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>