Skip to Content
author's profile photo Former Member
Former Member

Tracking Exceptions in SAP NetWeaver Developer Studio

Where do printStackTrace and System.out.println get printed in WAS (SAP Web AS 6.4)?

I have written a program where the JSP makes use of EJB(entity bean) to access the Database. A Java bean is used to communicate between the EJB and JSP.

An SQLException was encountered during the process. But I am not able to view the details of the Exception since front end in use is the JSP.

Can anyone come up with an appropriate solution?

Thanks in advance,


Add a comment
10|10000 characters needed characters exceeded

Related questions

3 Answers

  • Posted on Sep 30, 2005 at 05:07 AM

    Hi Pavithra,

    Welcome to SDN family. Now about your question.

    All the StackTrace are saved in the log file in the trace file at the server side. Moreover instead of System.out.println() you must use <b>System.err.println()</b> this will print whatever you want to print. Since all the println statement goes to Stack trace, thats why you need to use System.err.println() in the code.

    To view these logs file, there are many ways..

    1) Go to


    Here you will see the .trc file. See that trace file(<b>defaultTrace.0.trc</b>) all the logs are maintained here. Your System.err.println() will be also printing the message in this trace file.

    2) You can view the same log file from Administrator console, path is <b><your_installation_Drive>\usr\sap\<System_ID>\JC00\j2ee\admin</b>. Start <b>Go.bat</b>, this will start the Administrator console. There you will find a log Viewer where you can view this trace file as well.

    Let me give you a sample code, for how this System.err.println code will work:

    For eg, this is the catch block of a try statement:

    catch(Exception e)
    System.err.println("Pavithra this is a error" +e);

    Now when you will see the trace file this line with the exception string will be printed there.

    I hope this solves your problem.



    PS: Please consider rewarding points for helpful answers on SDN.

    Add a comment
    10|10000 characters needed characters exceeded

  • Posted on Sep 30, 2005 at 08:55 AM

    Hi PU,

    see Unable to see System.out outputs

    Hope it helps


    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Oct 04, 2005 at 07:34 AM

    Thank you very much for the answers... Now I am able to track down the problem.

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.