My Oracle Support Banner

Java.Sql.Sqlexception: Closed Statement: Next When Using Ref Cursor (Doc ID 1274294.1)

Last updated on SEPTEMBER 26, 2019

Applies to:

SQLJ - Version 11.1.0.6 and later
Information in this document applies to any platform.

Symptoms

SQLJ wrapper created for a PL/SQL procedure that returns REF CURSOR, fails with following at run time.

Exception in thread "main" 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)
at sqlj.runtime.ref.OraRTResultSet.next(OraRTResultSet.java:121)
at sqlj.runtime.ref.ResultSetIterImpl.next(ResultSetIterImpl.java:211)
at Main.main(Main.java:90)


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


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