My Oracle Support Banner

ORA-06531 When Invoking a Stored Procedure and Using setArray to Pass a Collection of Objects with JDBC (Doc ID 2617832.1)

Last updated on MARCH 02, 2020

Applies to:

JDBC - Version 12.2.0.0.0 and later
Information in this document applies to any platform.

Symptoms

Invoking a stored procedure and using setArray to pass a collection of objects with JDBC 18.3 fails with :
ORA-06531: Reference to uninitialized collection 

Steps to reproduce issue:

1) CREATE OR REPLACE TYPE "<ARRAY TYPE NAME>" AS TABLE OF VARCHAR2(30);

2) create or replace procedure <PROCEDURE NAME>(<PARAM NAME> IN <ARRAY TYPE NAME>) is
begin
 dbms_output.put_line(<PARAM NAME>.count);
end <PROCEDURE NAME>;

3) Populate array of <ARRAY TYPE NAME> type and call <PROCEDURE NAME> from a Java application using ojdbc8 18.3.0.0:
  Expected result: size of collection is printed
  Actual result: ORA-06531: Reference to uninitialized collection


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.