dev@glassfish.java.net

Re: Glassfish, JDK6 and JDBC4

From: Craig L Russell <Craig.Russell_at_Sun.COM>
Date: Thu, 14 Dec 2006 12:02:19 -0800

I almost agree. I'd think that exactly one log message at WARNING
level would be a good solution. As I understand the complaint, there
are multiple log messages which I agree is annoying, distracting, and
unwanted.

Craig

On Dec 14, 2006, at 10:47 AM, Lance J. Andersen wrote:

> I think i agree with Marina here. I would prefer us to not log
> this type of info unless we have detailed logging on. The more we
> write to the log results in overhead that is not needed and makes
> it more difficult to scan through the logs without seeing things
> you really do not need to worry about.
>
> Regards
> Lance
>
> Marina Vatkina wrote:
>> Jagadish,
>>
>> I agree with Dmitry, that the stack trace in the log is confusing and
>> doesn't provide any helpful information. A simple log message at a
>> reasonable
>> level (like INFO or CONFIG) can be enough.
>>
>> thanks,
>> -marina
>>
>> Jagadish Prasath Ramu wrote:
>>> 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)
>>>
>>> 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=a2
>>>>>> abed25-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.fillInResou
>>>>>> rceObjects(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.internalGetCo
>>>>>> nnection(ConnectionManagerImpl.java:312)
>>>>>> at
>>>>>> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConne
>>>>>> ction(ConnectionManagerImpl.java:176)
>>>>>> at
>>>>>> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateConne
>>>>>> ction(ConnectionManagerImpl.java:152)
>>>>>> at
>>>>>> com.sun.enterprise.connectors.ConnectionManagerImpl.allocateNonTx
>>>>>> Connection(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.doPasswordLog
>>>>>> in(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.inv
>>>>>> okeAdapter(DefaultProcessorTask.java:618)
>>>>>> at
>>>>>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.pro
>>>>>> cessNonBlocked(DefaultProcessorTask.java:549)
>>>>>> at
>>>>>> com.sun.enterprise.web.connector.grizzly.DefaultProcessorTask.pro
>>>>>> cess(DefaultProcessorTask.java:790)
>>>>>> at
>>>>>> com.sun.enterprise.web.connector.grizzly.DefaultReadTask.executeP
>>>>>> rocessorTask(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
>>>
>>
>> ---------------------------------------------------------------------
>> 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
>

Craig Russell
Architect, Sun Java Enterprise System http://java.sun.com/products/jdo
408 276-5638 mailto:Craig.Russell_at_sun.com
P.S. A good JDO? O, Gasp!