ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Keith Hatton" <khat...@axiomsystems.com>
Subject RE: junit stack trace truncated
Date Wed, 12 Mar 2003 09:22:21 GMT
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.

Keith


-----Original Message-----
From: Steve Kelem [mailto:s_kelem@pacbell.net]
Sent: 12 March 2003 07:36
To: user@ant.apache.org
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:
 
   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





---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
For additional commands, e-mail: user-help@ant.apache.org


Mime
View raw message