ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dominique Devienne <>
Subject RE: junit stack trace truncated
Date Wed, 12 Mar 2003 19:54:24 GMT
It's perfectly normal. The nested stack trace (the one that was caught, then
wrapped into a new exception whose cause was initialized to the exception
caught) contains duplicates stack elements with its outer exception. Since
the outer exception stack trace if fully printed, the nested one omits them.
It takes a little getting used to to be able to follow what's going on. --DD

-----Original Message-----
From: Keith Hatton [] 
Sent: Wednesday, March 12, 2003 3:22 AM
To: Ant Users List
Subject: RE: junit stack trace truncated

Hi Steve,

Unfortunately this is a "feature" of JDK1.4 (see Throwable.printStackTrace()
in the Javadocs). I don't know of a workaround other than switching to 1.3 -
which may or may not be suitable for your environment.


-----Original Message-----
From: Steve Kelem []
Sent: 12 March 2003 07:36
Subject: junit stack trace truncated

Does anyone know how to keep the stack trace from getting truncated when 
running JUnit tests?  (I'm pretty sure it's not JUnit doing the 
truncation, as the source for JUnit doesn't truncate the way it's being 
done here.  I'm guessing it's the xml writer, but that's not part of 
JUnit either.)
Is there a parameter that sets the stack trace depth?  (A system 
property?  Ant property? Where are system properties stored?)

The JUnit-generated xml file looks like:
   at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)

   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)


Caused by: java.lang.IndexOutOfBoundsException
   at waba.util.Vector.get(
   at waba.util.Vector.elementAt(
   at com.kelem.rlpp.palm.Categories.valid_Index(
   ... 19 more

Unfortunately, the element I need to see is a few calls before the last 
element printed.-(


I created a file called in "user.home":
(and verified that it's being read by grabbing the file that was generated while ant was running 
JUnit), and it didn't make any difference.

How do I stop the truncation?

Steve Kelem

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message