where to see java exception in oracle jvm

Posted on 2007-10-06
Last Modified: 2013-12-19
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

Question by:umar1farooq
    LVL 18

    Expert Comment

    by:Jinesh Kamdar
    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.
    LVL 73

    Accepted Solution

    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.

    LVL 73

    Expert Comment

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

    Featured Post

    Looking for New Ways to Advertise?

    Engage with tech pros in our community with native advertising, as a Vendor Expert, and more.

    Join & Write a Comment

    This article started out as an Experts-Exchange question, which then grew into a quick tip to go along with an IOUG presentation for the Collaborate confernce and then later grew again into a full blown article with expanded functionality and legacy…
    Background In several of the companies I have worked for, I noticed that corporate reporting is off loaded from the production database and done mainly on a clone database which needs to be kept up to date daily by various means, be it a logical…
    Via a live example show how to connect to RMAN, make basic configuration settings changes and then take a backup of a demo database
    This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.

    734 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    22 Experts available now in Live!

    Get 1:1 Help Now