Loading ...
Sorry, an error occurred while loading the content.

Re: [junit] Mysterious FileNotFoundException with junitvmwatcher

Expand Messages
  • Marián Petráš
    I think this happens if you have two versions of Ant on the classpath. Marián
    Message 1 of 3 , Dec 8, 2008
    View Source
    • 0 Attachment
      I think this happens if you have two versions of Ant on the classpath.

      Marián


      dave.alvarado@... wrote:
      > Hi,
      >
      > I'm using Eclipse 3.4 (WinXP) with Ant 1.7. I'm trying to run a JUnit test and get the error below
      >
      > Buildfile: C:\Temp\CedarPoint_Service\build-junit-test.xml
      > check-junit:
      > build-tests:
      > [javac] Compiling 9 source files to C:\Temp\CedarPoint_Service\classes
      > [copy] Copying 2 files to C:\Temp\CedarPoint_Service\classes
      > run-query-test:
      > [junit] java.io.FileNotFoundException: C:\Temp\CedarPoint_Service\junitvmwatcher1903248725.properties (The system cannot find the file specified)
      > [junit] at java.io.FileInputStream.open(Native Method)
      > [junit] at java.io.FileInputStream.<init>(FileInputStream.java:106)
      > [junit] at java.io.FileReader.<init>(FileReader.java:55)
      > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeAsForked(JUnitTask.java:1028)
      > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:817)
      > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.executeOrQueue(JUnitTask.java:1657)
      > [junit] at org.apache.tools.ant.taskdefs.optional.junit.JUnitTask.execute(JUnitTask.java:764)
      > [junit] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.java:288)
      > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      > [junit] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      > [junit] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      > [junit] at java.lang.reflect.Method.invoke(Method.java:585)
      > [junit] at org.apache.tools.ant.dispatch.DispatchUtils.execute(DispatchUtils.java:105)
      > [junit] at org.apache.tools.ant.Task.perform(Task.java:348)
      > [junit] at org.apache.tools.ant.Target.execute(Target.java:357)
      > [junit] at org.apache.tools.ant.Target.performTasks(Target.java:385)
      > [junit] at org.apache.tools.ant.Project.executeSortedTargets(Project.java:1329)
      > [junit] at org.apache.tools.ant.Project.executeTarget(Project.java:1298)
      > [junit] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(DefaultExecutor.java:41)
      > [junit] at org.eclipse.ant.internal.ui.antsupport.EclipseDefaultExecutor.executeTargets(EclipseDefaultExecutor.java:32)
      > [junit] at org.apache.tools.ant.Project.executeTargets(Project.java:1181)
      > [junit] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.run(InternalAntRunner.java:423)
      > [junit] at org.eclipse.ant.internal.ui.antsupport.InternalAntRunner.main(InternalAntRunner.java:137)
      >
      > BUILD FAILED
      > C:\Temp\CedarPoint_Service\build-junit-test.xml:118: Test QuerySubscriberTest failed (crashed)
      >
      > Total time: 12 seconds
      >
      >
      > I have no idea what this means or know how to begin to troubleshoot. Please help. The ant task in question is also listed below ...
      >
      > <target name="run-query-test" depends="build-tests">
      > <junit dir="${build}" fork="true" haltonfailure="true">
      > <classpath>
      > <path refid="project.class.path"/>
      > <pathelement path="${java.class.path}"/>
      > <pathelement path="${dist}/cedarpointpooledclient.jar"/>
      > <pathelement path="${build}"/>
      > </classpath>
      > <test name="QuerySubscriberTest" todir="${docs}" outfile="junit.query.result">
      > <formatter type="xml"/>
      > </test>
      > </junit>
      > </target>
    Your message has been successfully submitted and would be delivered to recipients shortly.