users
[Top] [All Lists]

Fw: printStackTrace prints nothing

To: users@xxxxxxxxxx
Subject: Fw: printStackTrace prints nothing
From: lei.han@xxxxxxxxxxxxx
Date: Tue, 22 Aug 2006 14:42:37 -0400
Cc: Minpu.Wei@xxxxxx
Delivered-to: mailing list users@cinjug.org
Mailing-list: contact users-help@cinjug.org; run by ezmlm

I found a java bug report
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4966410
very similair like what I am experiencing.

It even has an example there which you can run to test.

But I don't quite get the solution given there. Does anyone know what "-XX:+FullSpeedJVMDI" and "-XX:-OmitStackTraceInFastThrow" does? How would those options fix this problem?
Thanks!

Lei Han || Home : (248) 6149056 Cell: (513)6074271

----- Forwarded by Lei Han/CIMG/CVG on 08/22/2006 02:38 PM -----
Lei Han/CIMG/CVG

08/18/2006 10:53 AM

To
users@xxxxxxxxxx
cc
Subject
printStackTrace prints nothing




My code has logic like

java.io.StringWriter writer = new java.io.StringWriter();
e.printStackTrace(new java.io.PrintWriter(writer));
String stackTraceString = writer.toString();

buf.append(stackTraceString);

LOG.error(buf);

But in my log file I only see

java.lang.NullPointerException

There is no stack trace after it and also no print out like <<no stack trace available>>

How come the stack trace of java.lang.NullPointerException has not been printed out?

Thanks!

Lei Han || Home : (248) 6149056 Cell: (513)6074271
<Prev in Thread] Current Thread [Next in Thread>