title: getting error in Ant build junitreporting
body: <p>When I am trying to build without <code>junitreport</code> its working fine. However, I need the junit report in html format ultimately with all the successful or failed scripts. Please suggest where I am going wrong. Any help would be appreciated.</p>
  
  <pre><code>&lt;?xml version="1.0" encoding="UTF-8" standalone="no"?&gt;
  &lt;!-- WARNING: Eclipse auto-generated file.
                Any modifications will be overwritten.
                To include a user specific buildfile here, simply create one in the same
                directory with the processing instruction &lt;?eclipse.ant.import?&gt;
                as the first entry and export the buildfile again. --&gt;
  &lt;project basedir="." default="build" name="JavaP"&gt;
      &lt;property environment="env"/&gt;
      &lt;property name="junit.output.dir" value="junit"/&gt;
      &lt;property name="debuglevel" value="source,lines,vars"/&gt;
      &lt;property name="target" value="1.6"/&gt;
      &lt;property name="source" value="1.6"/&gt;
      &lt;path id="JavaP.classpath"&gt;
          &lt;pathelement location="bin"/&gt;
          &lt;pathelement location="../../Sel JAR/junit-4.8.1.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/jxl.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/poi-3.7.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/reportng-1.1.3.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/selenium-java-2.29.0.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/selenium-server-2.29.0.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/selenium-server-standalone-2.29.0.jar"/&gt;
          &lt;pathelement location="../../Sel JAR/testng-6.5.2.jar"/&gt;
      &lt;/path&gt;
      &lt;target name="init"&gt;
          &lt;mkdir dir="bin"/&gt;
          &lt;copy includeemptydirs="false" todir="bin"&gt;
              &lt;fileset dir="src"&gt;
                  &lt;exclude name="**/*.launch"/&gt;
                  &lt;exclude name="**/*.java"/&gt;
              &lt;/fileset&gt;
          &lt;/copy&gt;
      &lt;/target&gt;
      &lt;target name="clean"&gt;
          &lt;delete dir="bin"/&gt;
      &lt;/target&gt;
      &lt;target depends="clean" name="cleanall"/&gt;
      &lt;target depends="build-subprojects,build-project" name="build"/&gt;
      &lt;target name="build-subprojects"/&gt;
      &lt;target depends="init" name="build-project"&gt;
          &lt;echo message="${ant.project.name}: ${ant.file}"/&gt;
          &lt;javac debug="true" debuglevel="${debuglevel}" destdir="bin" source="${source}" target="${target}" includeantruntime="false"&gt;
              &lt;src path="src"/&gt;
              &lt;classpath refid="JavaP.classpath"/&gt;
          &lt;/javac&gt;
      &lt;/target&gt;
      &lt;target description="Build all projects which reference this project. Useful to propagate changes." name="build-refprojects"/&gt;
      &lt;target description="copy Eclipse compiler jars to ant lib directory" name="init-eclipse-compiler"&gt;
          &lt;copy todir="${ant.library.dir}"&gt;
              &lt;fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/&gt;
          &lt;/copy&gt;
          &lt;unzip dest="${ant.library.dir}"&gt;
              &lt;patternset includes="jdtCompilerAdapter.jar"/&gt;
              &lt;fileset dir="${ECLIPSE_HOME}/plugins" includes="org.eclipse.jdt.core_*.jar"/&gt;
          &lt;/unzip&gt;
      &lt;/target&gt;
      &lt;target description="compile project with Eclipse compiler" name="build-eclipse-compiler"&gt;
          &lt;property name="build.compiler" value="org.eclipse.jdt.core.JDTCompilerAdapter"/&gt;
          &lt;antcall target="build"/&gt;
      &lt;/target&gt;
      &lt;target name="JavaP"&gt;
          &lt;mkdir dir="${junit.output.dir}"/&gt;
          &lt;junit fork="yes" printsummary="withOutAndErr"&gt;
              &lt;formatter type="xml"/&gt;
              &lt;test name="seleniumtest.Helloworld" todir="${junit.output.dir}"/&gt;
              &lt;test name="seleniumtest.Testclass" todir="${junit.output.dir}"/&gt;
              &lt;classpath refid="JavaP.classpath"/&gt;
          &lt;/junit&gt;
      &lt;/target&gt;
      &lt;target name="junitreport"&gt;
          &lt;junitreport todir="${junit.output.dir}"&gt;
              &lt;fileset dir="${junit.output.dir}"&gt;
                  &lt;include name="TEST-*.xml"/&gt;
              &lt;/fileset&gt;
              &lt;report format="frames" todir="${junit.output.dir}"/&gt;
          &lt;/junitreport&gt;
      &lt;/target&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>Error Details</p>
  
  <pre><code>Buildfile: D:\Seljava\JavaP\build.xml
  build-subprojects:
  init:
  build-project:
       [echo] JavaP: D:\Seljava\JavaP\build.xml
  build:
  junitreport:
  [junitreport] Processing D:\Seljava\JavaP\junit\TESTS-TestSuites.xml to C:\Users\nitinl\AppData\Local\Temp\null1642041795
  [junitreport] Loading stylesheet jar:file:/D:/Eclipse-Workspace/eclipse/plugins/org.apache.ant_1.8.2.v20120109-1030/lib/ant-junit.jar!/org/apache/tools/ant/taskdefs/optional/junit/xsl/junit-frames.xsl
  [junitreport] : Error! The first argument to the non-static Java function 'replace' is not a valid object reference.
  [junitreport] : Error! Could not compile stylesheet
  [junitreport] : Fatal Error! Could not compile stylesheet Cause: Cannot convert data-type 'void' to 'reference'.
  [junitreport] Failed to process D:\Seljava\JavaP\junit\TESTS-TestSuites.xml
  
  BUILD FAILED
  D:\Seljava\JavaP\build.xml:70: Errors while applying transformations: Fatal error during transformation
  
  Total time: 450 milliseconds
  </code></pre>