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!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

Issue in appending data into JSON_ARRAY

User_CI7SYOct 12 2021

Hi Team,
In below code I am trying to append JSON_OBJECT_T type data dist_data into JSON_ARRAY named final_arr while the procedure loop through multiple records. But I am getting error while doing so, could you please help?
create or replace procedure calc_distinv_rank(p_doc_in IN CLOB
,p_doc_out OUT clob)
IS
final_arr JSON_ARRAY_T;
dist_data JSON_OBJECT_T;
loop
------------------SOME CODES-----------
final_arr := JSON_ARRAY_T(dist_data);
final_arr.APPEND(dist_data);
end loop;
DBMS_OUTPUT.PUT_LINE('FINAL ARRAY IS: ' || final_arr.TO_STRING);

Error-
Error report -
ORA-30625: method dispatch on NULL SELF argument is disallowed
ORA-06512: at "DISTINV.CALC_DISTINV_RANK", line 183
ORA-06512: at line 5
30625. 00000 - "method dispatch on NULL SELF argument is disallowed"
*Cause: A member method of a type is being invoked with a NULL SELF
argument.
*Action: Change the method invocation to pass in a valid self argument.

Comments

Post Details

Added on Oct 12 2021
4 comments
1,075 views