Skip to Main Content

ORDS, SODA & JSON in the Database

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!

How to get useful error stack when the PL/SQL code throws an exception

doberkoflerJun 13 2024

I'm struggling to understand how to get a useful error stack from ords when the invoked PL/SQL procedure raises an exception.

  1. By default ORDS hat the debug.printDebugToScreen setting set to false resulting in zero information on where the error in the PL/SQL code has actually occurred.
    ---
    curl "http://127.0.0.1:7777/ords/lj_unittest/TST_Examples_backend.exceptionsJson?error=raise_no_data_found"
    {
    "code": "InternalServerError",
    "message": "Internal Server Error",
    "type": "tag:oracle.com,2020:error/InternalServerError",
    "instance": "tag:oracle.com,2020:ecid/ujydo7ufzr2EfiMjho6h_w"
    }%
    ---

  2. When setting debug.printDebugToScreen to true, I get the needed information about the error location in the PL/SQL code but together with a crazy amount of useless Java stack that makes it almost impossible to understand the actual PL/SQL error message.

Is there a way to retrieve the important error information from a PL/SQL error when using ORDS similar to how it was possible in the OHS/mod_plsql implementation?

This post has been answered by doberkofler on Jun 20 2025
Jump to Answer
Comments
Post Details
Added on Jun 13 2024
5 comments
1,077 views