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

umar1farooqAsked:
Who is Participating?
 
sdstuberConnect With a Mentor Commented:
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.

dbms_java.set_output(100000);
0
 
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.
0
 
sdstuberCommented:
I believe I answered the question of where the text of the System output goes and provided an alternative as well
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.