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 10.1.0.2 to 10.2.0.2 [Release 10.1 to 10.2]Information in this document applies to any platform.
Symptoms
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(DatabaseError.java:112)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:676)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:602)
at oracle.jdbc.driver.T2CConnection.RefCursorBytesToStatement(T2CConnection.java:709)
at oracle.jdbc.driver.ResultSetAccessor.getCursor(ResultSetAccessor.java:60)
at oracle.jdbc.driver.OracleCallableStatement.getCursor(OracleCallableStatement.java:1653)
at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:112)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:676)
at oracle.jdbc.driver.T2CConnection.checkError(T2CConnection.java:602)
at oracle.jdbc.driver.T2CConnection.RefCursorBytesToStatement(T2CConnection.java:709)
at oracle.jdbc.driver.ResultSetAccessor.getCursor(ResultSetAccessor.java:60)
at oracle.jdbc.driver.OracleCallableStatement.getCursor(OracleCallableStatement.java:1653)
Changes
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 |
Changes |
Cause |
Solution |
References |