Submitted On 15-NOV-2002
ubxwgm
This bug should be fixed as soon as possible. Normally the
source of the error is exactly in the truncated part!! And
normally these exceptions are of type RemoteException - so
the workaround does not work.
Submitted On 15-MAR-2003
stinky
Amen! Nice idea, bad execution.
Nested exceptions are great. Recursive stack traces are
great. Truncating them so they don't scroll up forever is a
worthy try. But the algorithm by which an exception decides
exactly where to truncate is inscrutable, and it often guesses
wrong.
One recent example: I had a nested NullPointerException
inside an accessor. The printed stack trace aggressively
truncated this trace so all I saw was the line inside the
accessor where the null pointer was dereferenced, followed
by "...42 more". This did not provide me with any context as
to where the null pointer was *set* in the first place.
And they're not always remote exceptions! I get them a lot
in servlet development, since api exceptions get wrapped in
library exceptions get wrapped in servlet exceptions.
In fact, this whole Pandora's Box was opened when James
Gosling added checked exceptions to the language. Is there
a bug report for making checked exceptions optional? I'm not
kidding: the VM just understands exceptions; it's only the
Java compiler that forces us to declare, nest or swallow
exceptions (when the natural action should be to merely pass
them through).
Submitted On 19-MAR-2003
ecl207
ecl207
there is no way that is is only affecting 4 people. i have been
nearly randomly placing println statements in my code trying
to zero in on where the error is occuring. i think this is pretty
ridiculous. as umxwgm said the truncation tends to be in
exactly the part of the stack trace that i need. particularly in
rmi systems. sun get on this, please
Submitted On 08-NOV-2006
I also have the same problem, 4 years after it was reported here. Many libraries put an exception in an exception in an exception (e.g., IOException is put in a MyLibraryException put in a MyApplicationException) and when you print out this exception, the most important lines - what generated the original IOEXception - get truncated, and you only get the useless line numbers where IOException was wrapped in a MyLibraryException and rethrown, and so on...
PLEASE NOTE: JDK6 is formerly known as Project Mustang
|