My Oracle Support Banner

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

Last updated on MAY 27, 2009

Applies to:

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


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 or 11g JDBC OCI driver.

Sample logic: Error Stack:

java.sql.SQLException: Closed Statement: next
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.DatabaseError.throwSqlException(


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.