[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 808
  • Last Modified:

where to see java exception in oracle jvm

Hi experts,
This may be a very easy questions,
 Where i can see exception messages in oracle logs or trace fils.
i mean when stored procedure fails, exception block should execute but where in logs in oracle i can error messages.

try {
// other code
results = statement.executeQuery();

// other code

}catch (SQLException ex) {

            System.out.println("Statement = " + statement.toString() );

            System.err.println("Error why while Executing getMatchingProfilesInQueue(): "+ ex.getMessage() +  "  ex.toString() = "+ ex.toString());


thanks for help in advance

  • 2
1 Solution
Jinesh KamdarCommented:
Oracle error code and message are available in the SQLCODE and SQLERRM. If the procedure can pass these args back to the calling code, then you can display them in the catch block.
by default all System output goes to your trace files.  You can redirect it to dbms_output buffers by calling..

change the parameter value to limit the amount of data sent to the buffer.

I believe I answered the question of where the text of the System output goes and provided an alternative as well

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now