My Oracle Support Banner

GetCursor Call Fails With JDBC OCI Driver When Returning Data From a RefCursor (Doc ID 373427.1)

Last updated on MARCH 20, 2019

Applies to:

JDBC - Version to [Release 10.1 to 10.2]
Information in this document applies to any platform.


Calls to the JDBC method getCursor to return a result set from a stored procedure fails with a
java.sql.SQLException when using any version of the 10.x.x.x JDBC OCI driver.

The problem does not reproduce when using the 9.2.x.x OCI driver.
The problem does not reproduce when using any version of the JDBC Thin driver.

The top lines of exception stacks resulting from such a call resemble the following:

Exception in thread "main" java.sql.SQLException: 7
at oracle.jdbc.driver.DatabaseError.throwSqlException(
at oracle.jdbc.driver.T2CConnection.checkError(
at oracle.jdbc.driver.T2CConnection.checkError(
at oracle.jdbc.driver.T2CConnection.RefCursorBytesToStatement(
at oracle.jdbc.driver.ResultSetAccessor.getCursor(
at oracle.jdbc.driver.OracleCallableStatement.getCursor(




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

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