Passivation Fails With Error "Connection has already been closed" in PoolConnection.checkConnection() (Doc ID 1330271.1)

Last updated on AUGUST 05, 2016

Applies to:

Oracle JDeveloper - Version 11.1.1.5.0 and later
Information in this document applies to any platform.

Symptoms

You have developed a web application with ADF BC/Faces/JHeadstart 11g.

The application works correctly in the Development environment.
In your QA and Production environment, however, the end users notice the following unexpected behavior, occurring intermittently:
Suppose the end user has access to 2 records from a View Object:
A
B

When editing the second record, say with value "C", and saving the changes, the end user first gets
a dialog "No changes to save" (though the record was updated).
Then the first record (instead of the second one) is updated with the value; so he ends up with:
C
B

Checking your log files, you see the following error occurring during the passivation:

...
java.sql.SQLException: Connection has already been closed.
   at weblogic.jdbc.wrapper.PoolConnection.checkConnection(PoolConnection.java:58)
   at weblogic.jdbc.wrapper.Connection.preInvocationHandler(Connection.java:94)
   at weblogic.jdbc.wrapper.Connection.getMetaData(Connection.java:436)
   at oracle.jbo.server.DBTransactionImpl.getDatabaseProductName(DBTransactionImpl.java:1254)
   at oracle.jbo.server.DBTransactionImpl.getInternalConnection(DBTransactionImpl.java:1373)
   at oracle.jbo.server.DBTransactionImpl.getPersistManagerConnection(DBTransactionImpl.java:1300)
   at oracle.jbo.pcoll.PCollManager.ensureConnection(PCollManager.java:486)
   at oracle.jbo.pcoll.OraclePersistManager.getConnection(OraclePersistManager.java:153)
   at oracle.jbo.pcoll.OraclePersistManager.insert(OraclePersistManager.java:1881)
   at oracle.jbo.pcoll.PCollNode.passivateElem(PCollNode.java:564)
   at oracle.jbo.pcoll.PCollNode.passivate(PCollNode.java:688)
...


and no error was reported at that time in the ADF Faces page.

Your JDBC Datasource is set up to "oracle.jdbc.OracleDriver" and not the XA driver "oracle.jdbc.xa.client.OracleXADataSource", excluding known issues as documented in
<note:1275192.1>.
The error cannot be reproduced at will, even when disabling the Application Module pooling as explained in <note:417546.1> - How To Reproduce Problems Related to AM Passivation / Activation.

One of the difficulties in reproducing the problem is getting the timing right:

Cause

Sign In with your My Oracle Support account

Don't have a My Oracle Support account? Click to get started

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms