Hello,
I have a package with 2 procedures. Procedure text and procedure text2. Both are the same function so I will only copy one of them.
procedure text(id in number, name in varchar)
as
json_ clob;
begin
apex_json.flush;
apex_json.initialize_clob_output;
apex_json.open_object;
apex_json.close_object;
json_ := apex_json.get_clob_output;
apex_json.free_output;
dbms_output.put_line('-- json = ' || json_)
end;
When I call those procedures from the APEX SQL workshop console, is fine and works everything.
Nevertheless, I have 2 tables: User and Person.
User has a triger when insert a row, and call text()
Person has a triger when insert a row and call text2()
User trigger, works fine without errors, but Person trigger fail.
I try many options, like hardcoding values from the trigger, split both procedures in different packages, etc and only works when I comment apex_json library.
The error I get when I try insert in this table from APEX client using an IG. If I insert from console trigger is also fine.
Error I get is:
{
"error":"JSON.WRITER.CLOSE_OBJECT"
,"addInfo":"Contact your application administrator."
,"techInfo":[
{
"name":"is_internal_error"
,"value":"true"
}
,{
"name":"apex_error_code"
,"value":"JSON.WRITER.CLOSE_OBJECT"
}
,{
"name":"component.type"
,"value":"APEX_APPLICATION_PAGE_REGIONS"
}
,{
"name":"component.id"
,"value":"119676813345739286299"
}
,{
"name":"error_backtrace"
,"value":"----- PL\/SQL Call Stack -----\n object line object\n handle number name\n0x3afb464bd0 980 package body APEX_220100.WWV_FLOW_ERROR.INTERNAL_GET_ERROR\n0x3afb464bd0 1048 package body APEX_220100.WWV_FLOW_ERROR.INTERNAL_ADD_ERROR\n0x3afb464bd0 1521 package body APEX_220100.WWV_FLOW_ERROR.RAISE_INTERNAL_ERROR\n0x3afb7d6540 3130 package body APEX_220100.WWV_FLOW_JSON.CLOSE_OBJECT\n0x393ca66548 1638 package body APEX_220100.WWV_FLOW.AJAX_DISPATCH_REQUEST\n0x393ca66548 2968 package body APEX_220100.WWV_FLOW.SHOW\n0x393ca66548 4335 package body APEX_220100.WWV_FLOW.AJAX\n0x3a92f894e8 2 anonymous block\n"
,"usePre":true
}
]
,"pageSubmissionId":"141438442564204707940730770854660895233"
}