My Oracle Support Banner

WebLogic Server 10.3.x: Getting "java.sql.SQLException: Result set already closed" Exception When Calling ResultSet.next() (Doc ID 1338615.1)

Last updated on NOVEMBER 05, 2016

Applies to:

Oracle Weblogic Server - Version 10.3 and later
Information in this document applies to any platform.

Symptoms

In WebLogic Server version 10.3 and above, an issue of getting "java.sql.SQLException: Result set already closed" exception was reported when calling ResultSet.next(). Below is snippet of the exception trace at the time of the issue:

java.sql.SQLException: Result set already closed
at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:110)
at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:65)
at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source)
at ....customer code...

Below is snippet of code which was calling ResultSet.next()which was causing the above exception.

ResultSet rs1=stmt.execute("select count(*) from customer table");
while(rs1.next())
{
  stmt.execute(...);//this call will close the current resultset, just rs1
}

Cause

To view full details, sign in with your My Oracle Support account.

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


In this Document
Symptoms
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.