users@glassfish.java.net

Re: Toplink cache behavior

From: <glassfish_at_javadesktop.org>
Date: Thu, 26 Jul 2007 10:32:13 PDT

Thanks; I'm noticing this error, which seems to be exclusively in the domain of the application server:
[code]java.lang.NullPointerException
        at com.sun.enterprise.resource.AbstractResourcePool.isNonXAResourceInTransaction(AbstractResourcePool.java:628)
        at com.sun.enterprise.resource.AbstractResourcePool.isLocalResourceInTransaction(AbstractResourcePool.java:1020)
        at com.sun.enterprise.resource.AbstractResourcePool.isLocalResourceEligibleForReuse(AbstractResourcePool.java:988)
        at com.sun.enterprise.resource.AbstractResourcePool.resourceClosed(AbstractResourcePool.java:970)
        at com.sun.enterprise.resource.PoolManagerImpl.putbackResourceToPool(PoolManagerImpl.java:434)
        at com.sun.enterprise.resource.PoolManagerImpl.resourceClosed(PoolManagerImpl.java:401)
        at com.sun.enterprise.resource.LocalTxConnectionEventListener.connectionClosed(LocalTxConnectionEventListener.java:71)
        at com.sun.gjc.spi.ManagedConnection.connectionClosed(ManagedConnection.java:645)
        at com.sun.gjc.spi.base.ConnectionHolder.close(ConnectionHolder.java:201)
        at com.sun.gjc.spi.jdbc40.ConnectionHolder40.close(ConnectionHolder40.java:519)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeDatasourceConnection(DatabaseAccessor.java:394)
        at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.closeConnection(DatasourceAccessor.java:382)
        at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.closeConnection(DatabaseAccessor.java:417)
        at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.afterJTSTransaction(DatasourceAccessor.java:115)
        at oracle.toplink.essentials.threetier.ClientSession.afterTransaction(ClientSession.java:119)
        at oracle.toplink.essentials.internal.sessions.UnitOfWorkImpl.afterTransaction(UnitOfWorkImpl.java:1838)
        at oracle.toplink.essentials.transaction.AbstractSynchronizationListener.afterCompletion(AbstractSynchronizationListener.java:170)
        at oracle.toplink.essentials.transaction.JTASynchronizationListener.afterCompletion(JTASynchronizationListener.java:102)
        at com.sun.enterprise.distributedtx.J2EETransaction.commit(J2EETransaction.java:491)
        at com.sun.enterprise.distributedtx.J2EETransactionManagerOpt.commit(J2EETransactionManagerOpt.java:371)
        at com.sun.ejb.containers.BaseContainer.completeNewTx(BaseContainer.java:3781)
        at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3560)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1343)
        at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1305)
        at com.sun.ejb.containers.EJBObjectInvocationHandler.invoke(EJBObjectInvocationHandler.java:210)
        at com.sun.ejb.containers.EJBObjectInvocationHandlerDelegate.invoke(EJBObjectInvocationHandlerDelegate.java:117)
        at $Proxy117.save(Unknown Source)
        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 com.sun.corba.ee.impl.presentation.rmi.ReflectiveTie._invoke(ReflectiveTie.java:125)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatchToServant(CorbaServerRequestDispatcherImpl.java:658)
        at com.sun.corba.ee.impl.protocol.CorbaServerRequestDispatcherImpl.dispatch(CorbaServerRequestDispatcherImpl.java:198)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequestRequest(CorbaMessageMediatorImpl.java:1820)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:1680)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleInput(CorbaMessageMediatorImpl.java:1062)
        at com.sun.corba.ee.impl.protocol.giopmsgheaders.RequestMessage_1_2.callback(RequestMessage_1_2.java:194)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.handleRequest(CorbaMessageMediatorImpl.java:780)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.dispatch(CorbaMessageMediatorImpl.java:537)
        at com.sun.corba.ee.impl.protocol.CorbaMessageMediatorImpl.doWork(CorbaMessageMediatorImpl.java:2541)
        at com.sun.corba.ee.impl.orbutil.threadpool.ThreadPoolImpl$WorkerThread.run(ThreadPoolImpl.java:524)
|#][/code]

Does that help? This occurs after the merge() call. No error is reported to the client, and from the client's perspective, everything is OK. That suggests to me that this is occurring on a different thread? Or after control has been handed back to the client?

Laird
[Message sent by forum member 'ljnelson' (ljnelson)]

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