Details
-
Bug
-
Resolution: Fixed
-
Medium
-
2.6
-
None
-
GNU/Linux 2.6.31
Java(TM) SE Runtime Environment (build 1.6.0-b105)
Java HotSpot(TM) Client VM (build 1.6.0-b105, mixed mode, sharing)
ant 1.7.0
Description
We run clover simply by running "ant clover.all". The only settings we have in our build.xml are these lines:
<property name="clover.jar" value="${lib.dir}/clover/clover-2.6.0.jar"/>
<property name="clover.dest" value="${project.dir}/build/clover-report"/>
<taskdef resource="cloverlib.xml" classpath="${clover.jar}"/>
<clover-env/>
With clover-2.4.0 and 2.5.0 this worked pretty well. But now I replaced the clover JAR file with the 2.6.0 version, and instrumentation fails. Here's the output:
Buildfile: build.xml
[clover-env] Loading clover.xml: jar:file:/lab/gupro/ist/ukoisthome/jgralab/lib/clover/clover-2.6.0.jar!/clover.xml
clover.clean:
[clover-clean] Clover Version 2.6.0, built on September 09 2009 (build-771)
[clover-clean] Loaded from: /lab/gupro/ist/ukoisthome/jgralab/lib/clover/clover-2.6.0.jar
[clover-clean] Clover: Open Source License registered to JGraLab.
with.clover:
[clover-setup] Clover Version 2.6.0, built on September 09 2009 (build-771)
[clover-setup] Loaded from: /lab/gupro/ist/ukoisthome/jgralab/lib/clover/clover-2.6.0.jar
[clover-setup] Clover: Open Source License registered to JGraLab.
[clover-setup] Clover is enabled with initstring '/lab/gupro/ist/ukoisthome/jgralab/.clover/clover2_6_0.db'
clover.all:
[clover-env] Loading clover.xml: jar:file:/lab/gupro/ist/ukoisthome/jgralab/lib/clover/clover-2.6.0.jar!/clover.xml
cleanall:
cleanall:
[echo] ../common/build.xml clean all - deleting all generated files
[delete] Deleting directory /lab/gupro/ist/ukoisthome/jgralab/build
[echo] clean all finished
jgralab:
compile:
[echo] ../common/build.xml compile - compiling sources
[mkdir] Created dir: /lab/gupro/ist/ukoisthome/jgralab/build/classes
[javac] Since compiler setting isn't classic or modern,ignoring fork setting.
[javac] Compiling 156 source files to /lab/gupro/ist/ukoisthome/jgralab/build/classes
[clover] Clover Version 2.6.0, built on September 09 2009 (build-771)
[clover] Loaded from: /lab/gupro/ist/ukoisthome/jgralab/lib/clover/clover-2.6.0.jar
[clover] Clover: Open Source License registered to JGraLab.
[clover] Fork is set to true and will be respected (ignore any warnings from Ant).
[clover] Creating new database at '/lab/gupro/ist/ukoisthome/jgralab/.clover/clover2_6_0.db'.
[clover] Processing files at 1.6 source level.
[clover] Clover all over. Instrumented 156 files (10 packages).
[clover] Elapsed time = 5,067 secs. (30,787 files/sec, 7.012,631 srclines/sec)
[javac] Since compiler setting isn't classic or modern,ignoring fork setting.
[javac] /tmp/clover37640.tmp/de/uni_koblenz/jgralab/codegenerator/CodeGenerator.java:43: cannot find symbol
[javac] symbol : method getNullRecorder()
[javac] location: class com_cenqua_clover.Clover
[javac] public abstract class CodeGenerator {public static class __CLR2_6_04zf4zffznulodb{public static final com_cenqua_clover.CoverageRecorder R;static{com_cenqua_clover.CoverageRecorder _R=null;try{if(20090909092616283L!=com_cenqua_clover.CloverVersionInfo.getBuildStamp())
_R=com_cenqua_clover.Clover.getNullRecorder();_R=com_cenqua_clover.Clover.getRecorder(new char[]
{47,108,97,98,47,103,117,112,114,111,47,105,115,116,47,117,107,111,105,115,116,104,111,109,101,47,106,103,114,97,108,97,98,47,46,99,108,111,118,101,114,47,99,108,111,118,101,114,50,95,54,95,48,46,100,98},null,1253091962017L,0L,6620);}catch(java.lang.SecurityException e)
{java.lang.System.err.println("[CLOVER] FATAL ERROR: Clover could not be initialised because it has insufficient security privileges. Please consult the Clover documentation on the security policy file changes required. ("+e.getClass()+":"+e.getMessage()+")");}catch(java.lang.NoClassDefFoundError e)
{java.lang.System.err.println("[CLOVER] FATAL ERROR: Clover could not be initialised. Are you sure you have Clover in the runtime classpath? ("+e.getClass()+":"+e.getMessage()+")");}catch(java.lang.Throwable t)
{java.lang.System.err.println("[CLOVER] FATAL ERROR: Clover could not be initialised because of an unexpected error. ("+t.getClass()+":"+t.getMessage()+")");}R=_R;}}
Hundreds of similar errors complaining about the missing getNullRecorder() method follow for all classes that should be instrumented.
I ensured that there's only the new clover-2.6.0.jar in the CLASSPATH, and I also deleted the myProject/.clover/ directory and made clean, so that there are no old class files around.