You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Steve Kelem <s_...@pacbell.net> on 2003/03/12 08:36:09 UTC

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:
 
   java.lang.reflect.InvocationTargetException
   at sun.reflect.GeneratedMethodAccessor2.invoke(Unknown Source)
   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

   at 
com.kelem.util.PrivilegedAccessor.invokeMethod(PrivilegedAccessor.java:156)
   at 
com.kelem.rlpp.palm.CategoriesTest.testValid_Index(CategoriesTest.java:347)
   at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
   at 
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) 

   at 
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) 

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

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

 

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

How do I stop the truncation?

Thanks,
Steve Kelem