users@glassfish.java.net

mysql sun on app server 8 ManagedConnection.connectionClosed

From: <glassfish_at_javadesktop.org>
Date: Thu, 22 Jan 2009 10:08:44 PST

Hi i am getting the error below while using myql datasource with hibernate on sun one app server 8.2.

it works fine when i acees it first time but when i make a seconed atempt to get data it gives me error below.

i am using mysql connector 5 version driver.

please help and advise

[#|2009-01-22T18:06:18.074+0000|SEVERE|sun-appserver-pe8.2|javax.enterprise.resource.resourceadapter|_ThreadID=16;|RAR5031:System Exception
java.lang.NullPointerException
        at com.sun.enterprise.resource.ConnectorXAResource.getResourceHandle(ConnectorXAResource.java:177)
        at com.sun.enterprise.resource.ConnectorXAResource.end(ConnectorXAResource.java:103)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.delistResource(J2EETransactionManagerOpt.java:191)
        at com.sun.enterprise.resource.ResourceManagerImpl.unregisterResource(ResourceManagerImpl.java:210)
        at com.sun.enterprise.resource.ResourceManagerImpl.delistResource(ResourceManagerImpl.java:168)
        at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:323)
        at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:51)
        at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:565)
        at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:120)
        at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:74)
        at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:451)
        at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:406)
        at org.hibernate.jdbc.ConnectionManager.afterStatement(ConnectionManager.java:281)
        at org.hibernate.jdbc.AbstractBatcher.closePreparedStatement(AbstractBatcher.java:543)
        at org.hibernate.jdbc.AbstractBatcher.closeStatement(AbstractBatcher.java:269)
        at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:285)
        at org.hibernate.jdbc.AbstractBatcher.closeQueryStatement(AbstractBatcher.java:212)
        at org.hibernate.loader.Loader.doQuery(Loader.java:726)
        at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
        at org.hibernate.loader.Loader.doList(Loader.java:2220)
        at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
        at org.hibernate.loader.Loader.list(Loader.java:2099)
        at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
        at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
        at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)



[#|2009-01-22T18:06:18.105+0000|WARNING|sun-appserver-pe8.2|javax.enterprise.system.stream.err|_ThreadID=16;|
java.lang.RuntimeException: Got exception during XAResource.end: javax.transaction.xa.XAException: com.sun.enterprise.resource.PoolingException: java.lang.NullPointerException
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.delistResource(J2EETransactionManagerOpt.java:193)
        at com.sun.enterprise.resource.ResourceManagerImpl.unregisterResource(ResourceManagerImpl.java:210)
        at com.sun.enterprise.resource.ResourceManagerImpl.delistResource(ResourceManagerImpl.java:168)
        at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:323)
        at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:51)
        at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:565)
        at com.sun.gjc.spi.ConnectionHolder.close(ConnectionHolder.java:120)
        at org.hibernate.connection.DatasourceConnectionProvider.closeConnection(DatasourceConnectionProvider.java:74)
        at org.hibernate.jdbc.ConnectionManager.closeConnection(ConnectionManager.java:451)
        at org.hibernate.jdbc.ConnectionManager.aggressiveRelease(ConnectionManager.java:406)
        at org.hibernate.jdbc.ConnectionManager.afterTransaction(ConnectionManager.java:293)
        at org.hibernate.jdbc.JDBCContext.afterNontransactionalQuery(JDBCContext.java:241)
        at org.hibernate.impl.SessionImpl.afterOperation(SessionImpl.java:417)
        at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1126)
        at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
        at
[Message sent by forum member 'vishalparmar' (vishalparmar)]

http://forums.java.net/jive/thread.jspa?messageID=327686