I have a page that uses an Ajax Callback process to execute some plsql code. This works just fine.
But after adding a call to another (database) procedure, I am getting the error Unexpected end of JSON input.
My Ajax Call back process has the following lines (this was necessary to prevent the same Unexpected end of JSON input, error:
apex_json.open_object;
apex_json.write('success', true);
apex_json.close_object;
But the procedure that I added also uses :
apex_escape.set_html_escaping_mode('B');
apex_json.initialize_clob_output ();
apex_json.open_object ();
apex_json.write ('on', p_on);
apex_json.close_all ();
l_req_body := apex_json.get_clob_output ();
apex_json.free_output ();
When I deactivate this block, the error no longer appears. I have tried to solve this problem by making the procedure an autonomous transaction procedure, but that does not solve it.
I also tried adding the
apex_json.open_object;
apex_json.write('success', true);
apex_json.close_object;
lines to the end of the database procedure, but again, that does not solve the problem.
What can I do?
Kind regards
Geert