You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@ant.apache.org by Eric Wood <EW...@llbean.com> on 2007/06/08 21:17:24 UTC

Ant 1.7.0 and Junit error

When I run JUNIT (using junit-3.8.1.jar) on my code I get the following
error:

 java.io.FileNotFoundException:
/cclocal/viewroot/content_management/wim/build_wim_Integration/vob/conte
nt_management/wim/WIM-Service/junitvmwatcher1813934409.properties (No
such file or directory)
    [junit]     at java.io.FileInputStream.open(Native Method)
    [junit]     at
java.io.FileInputStream.<init>(FileInputStream.java:129)
    [junit]     at java.io.FileReader.<init>(FileReader.java:76) ...

My junit target looks like this:
    <junit printsummary="yes" haltonerror="false" haltonfailure="false">
        <classpath>
            <path refid="classpath.build" />
            <!--pathelement location="${junit.src.dir}" /-->
        </classpath>

        <formatter type="plain"/>
        <formatter type="xml"/>

        <batchtest fork="no" todir="${dir.junit.reports}" >
            <fileset dir="${dir.java.src}">
                <include name="**/*.java"/>
            </fileset>
        </batchtest>
    </junit>
  </target>

I search the archive and saw an old mail that said this bub was resolved
in a earlier beta version. Any help would be greatly appreciated.

Eric

Re: Ant 1.7.0 and Junit error

Posted by Peter Reilly <pe...@gmail.com>.
This is normally due to having an old (pre ant 1.7.0) version of JUnitTask
somewhere in the classpath.
It is for example in weblogic.jar, "slurping up" spring jars including
an old ant.jar file, or using WAS
see:

http://issues.apache.org/bugzilla/show_bug.cgi?id=41511

Peter

On 6/8/07, Eric Wood <EW...@llbean.com> wrote:
> When I run JUNIT (using junit-3.8.1.jar) on my code I get the following
> error:
>
>  java.io.FileNotFoundException:
> /cclocal/viewroot/content_management/wim/build_wim_Integration/vob/conte
> nt_management/wim/WIM-Service/junitvmwatcher1813934409.properties (No
> such file or directory)
>     [junit]     at java.io.FileInputStream.open(Native Method)
>     [junit]     at
> java.io.FileInputStream.<init>(FileInputStream.java:129)
>     [junit]     at java.io.FileReader.<init>(FileReader.java:76) ...
>
> My junit target looks like this:
>     <junit printsummary="yes" haltonerror="false" haltonfailure="false">
>         <classpath>
>             <path refid="classpath.build" />
>             <!--pathelement location="${junit.src.dir}" /-->
>         </classpath>
>
>         <formatter type="plain"/>
>         <formatter type="xml"/>
>
>         <batchtest fork="no" todir="${dir.junit.reports}" >
>             <fileset dir="${dir.java.src}">
>                 <include name="**/*.java"/>
>             </fileset>
>         </batchtest>
>     </junit>
>   </target>
>
> I search the archive and saw an old mail that said this bub was resolved
> in a earlier beta version. Any help would be greatly appreciated.
>
> Eric
>

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