My Oracle Support Banner

SQLJ-Generated Code Loaded into DB Fails with 'Closed Statement' when Being Called. (Doc ID 758194.1)

Last updated on MARCH 20, 2019

Applies to:

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


When loading .class files generated by 10.2.x.x SQLJ into a or database and creating Java Stored Procedures to call these class files, calls to these Java Stored Procedures from an anonymous PL/SQL block are successful. However, when performing the same operation, but loading the .class files to a database, the call to the Java Stored Procedure fails from an anonymous PL/SQL block fails with the following error:

ORA-29532: Java call terminated by uncaught Java exception: java.sql.SQLException: Closed
Statement: next

These .class files were generated using 10.2.x.x SQLJ (through version with JDK 1.4.2. Either version of SQLJ worked against a or database but failed against The same error is seen when using JDK 1.5 and loading the .class files to an database.

The error can be seen by running following testcase:

  1. Create and populate test table from SQL*Plus:




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.