Passivation Fails With Error "Connection has already been closed" in PoolConnection.checkConnection()
Last updated on MARCH 20, 2018
Applies to:Oracle JDeveloper - Version 184.108.40.206.0 and later
Information in this document applies to any platform.
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:
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:
Checking your log files, you see the following error occurring during the passivation:
java.sql.SQLException: Connection has already been closed.
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:
- if you execute through the editing of an item too quickly, it works fine all the time.
- if you wait too long between saving changes it also seems to work fine.
- if you wait just a minute or two you can sometimes reproduce the problem.
Sign In with your My Oracle Support account
Don't have a My Oracle Support account? Click to get started
Million Knowledge Articles and hundreds of Community platforms