My Oracle Support Banner

"SQLException: Result set already closed" in afterRollback() Method (Doc ID 1053792.1)

Last updated on JUNE 30, 2017

Applies to:

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


You are developing an ADF BC application in JDeveloper
You're deploying to WebLogic 10.3.1 and use an Oracle 10g database
You are not using XA Datasources.

You implemented a solution to retain the selected records over commits and rollbacks, as explained by Steve Muench in example 68.

Sometimes a java.sql.SQLException with the message "Result set already closed" occurs in the afterRollback() method that you implemented in your custom ViewObjectImpl class.
The exception occurs in the call to executeQuery().

The stack trace is the following:

java.sql.SQLException: Result set already closed
        at weblogic.jdbc.wrapper.ResultSet.checkResultSet(
        at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(
        at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getBytes(Unknown Source)
        at oracle.jbo.domain.Number$1facClass.createDatum(
        at oracle.jbo.server.OracleSQLBuilderImpl.doLoadFromResultSet(
        at <yourPackage>.<yourViewObjectImpl>.afterRollback(<yourViewObjectImpl>.java:<line>)
at oracle.jbo.server.DBTransactionImpl.rollback(

You can surround the code by a try-catch block to prevent the error to be shown to the end user.
However, the user still notices that his selection is lost over the rollback.

NB: The problem was also discussed in the OTN forum: Result set already closed


To view full details, 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 a vibrant support community of peers and Oracle experts.