You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by "Mikael Petterson (KI/EAB)" <mi...@ericsson.com> on 2005/10/26 10:13:11 UTC

java.nio.BufferOverflowException in junit task

Hi,

we are running some junit (3.8.1) tests with ant (1.6.2) and after a while when running the tests we get the following error (see below).
we are using sun's jdk 1.4.2_04.
Any ideas what this might be?

cheers,

//mikael 


The ' characters around the executable and arguments are
not part of the command.
    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.873 sec
    [junit] Tests run: 19, Failures: 0, Errors: 0, Time elapsed: 0.103 sec
    [junit] Exception in thread "main" java.nio.BufferOverflowException
    [junit]     at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
    [junit]     at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:188)
    [junit]     at java.lang.StringCoding.decode(StringCoding.java:224)
    [junit]     at java.lang.StringCoding.decode(StringCoding.java:230)
    [junit]     at java.lang.String.<init>(String.java:371)
    [junit]     at java.lang.String.<init>(String.java:390)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:305)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:537)




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


Re: java.nio.BufferOverflowException in junit task

Posted by Tim Meals <ti...@codeknox.com>.
Mikael --

Try running with LANG=en_US.UTF-8, if possible.  Other languages might 
work as well, or try a different JDK.  I came across the 
BufferOverflowException when working with large ZIP files.  Some 
Googling turned up a closed bug with the Sun JVM.  Setting LANG is a 
workaround, or upgrade to the latest 1.4.2 (or 1.5, if you're 
comfortable with it) series.  On Linux, I'm running 1.4.2-08.

Good luck,
Tim

Mikael Petterson (KI/EAB) wrote:

>Hi,
>
>we are running some junit (3.8.1) tests with ant (1.6.2) and after a while when running the tests we get the following error (see below).
>we are using sun's jdk 1.4.2_04.
>Any ideas what this might be?
>
>cheers,
>
>//mikael 
>
>
>The ' characters around the executable and arguments are
>not part of the command.
>    [junit] Tests run: 3, Failures: 0, Errors: 0, Time elapsed: 0.873 sec
>    [junit] Tests run: 19, Failures: 0, Errors: 0, Time elapsed: 0.103 sec
>    [junit] Exception in thread "main" java.nio.BufferOverflowException
>    [junit]     at java.nio.charset.CoderResult.throwException(CoderResult.java:259)
>    [junit]     at java.lang.StringCoding$CharsetSD.decode(StringCoding.java:188)
>    [junit]     at java.lang.StringCoding.decode(StringCoding.java:224)
>    [junit]     at java.lang.StringCoding.decode(StringCoding.java:230)
>    [junit]     at java.lang.String.<init>(String.java:371)
>    [junit]     at java.lang.String.<init>(String.java:390)
>    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.run(JUnitTestRunner.java:305)
>    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.launch(JUnitTestRunner.java:656)
>    [junit]     at org.apache.tools.ant.taskdefs.optional.junit.JUnitTestRunner.main(JUnitTestRunner.java:537)
>
>
>
>
>---------------------------------------------------------------------
>To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
>For additional commands, e-mail: user-help@ant.apache.org
>
>  
>

-- 
/**
 * 	Tim Meals
 * 	Web Applications Developer
 *
 * 	@email 	tim@codeknox.com <ma...@codeknox.com>
 */