Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using Clob data type in collections

917370May 5 2023 — edited May 5 2023

We are using 2 columns as Clob data type in collections and this collection object is used as input parameter to the procedure. The procedure is being called by Java for passing the values and storing the results in database. But the collection is causing issue in the Java as when we use columns with Clob data type, the collection itself is not getting constructed in Java and it is giving the below error:-

JOB ID:583 OBJECT NAME:SESSION_SLOT JAVA START TIME:05-05-23 JOB STATUS:Failed REMARKS:CallableStatementCallback; uncategorized SQLException for SQL [{call PEPE_CDE_SSOT_INTEGRATION_PKG.PEPE_CDE_SESSION_SLOTS_INSERT(?, ?, ?, ?)}]; SQL state [99999]; error code [65502]; ORA-65502: cannot access temporary LOB data
; nested exception is java.sql.SQLException: ORA-65502: cannot access temporary LOB data

So, hope the issue is clear that when we are calling a procedure from Java using collection having clob data type , it is giving error.

I know we can create collection using clob data type in Oracle but Is clob data type supported in collection when being called from java. Is there any supported datatype for Clob from Java. Please suggest how to resolve the error.

Comments
Post Details
Added on May 5 2023
6 comments
966 views