Using ResultSet.next() Throws "java.sql.SQLException: Closed Statement: Next" When Accessing Refcursor (Doc ID 736490.1)

Last updated on MAY 27, 2009

Applies to:

JDBC - Version: 10.2.0.4.0 to 11.1.0.6.0
This problem can occur on any platform.

Symptoms

Existing JDBC application that calls a PL/SQL procedure that returns a ref cursor now receives
"java.sql.SQLException: Closed Statement: next" when using a version 10.2.0.4 or 11g JDBC OCI driver.

Sample logic:

10.2.0.4 Error Stack:

java.sql.SQLException: Closed Statement: next
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:146)
at oracle.jdbc.driver.OracleResultSetImpl.next(OracleResultSetImpl.java:187)

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