I am generating the Meta data by instrumenting the classes offline. And then collecting the coverage data while running the code deployed in Application Server.
I am getting the following error while generating the report.
It use to work fine bug recently it started giving error. I am not sure if it is related but the classes it complains about either entending threads or using inner classes.
Here is the error message.
[report] com.vladium.emma.EMMARuntimeException: [CLASS_STAMP_MISMATCH] runtim
e version of class [com.sun.jbi.engine.bpel.core.bpel.model.runtime.impl.PickUni
tImpl] in the coverage data is not consistent with the version of this class in
the metadata, possibly because stale metadata is being used for report generatio
n.
[report] at com.vladium.emma.report.ReportDataModel.getView(ReportDataMod
el.java:95)
[report] at com.vladium.emma.report.AbstractReportGenerator.initialize(Ab
stractReportGenerator.java:210)
[report] at com.vladium.emma.report.html.ReportGenerator.process(ReportGe
nerator.java:85)
[report] at com.vladium.emma.report.ReportProcessor._run(ReportProcessor.
java:255)
[report] at com.vladium.emma.Processor.run(Processor.java:88)
[report] at com.vladium.emma.report.reportTask.execute(reportTask.java:77
)
[report] at com.vladium.emma.emmaTask.execute(emmaTask.java:58)
[report] at org.apache.tools.ant.UnknownElement.execute(UnknownElement.ja
va:275)
[report] at org.apache.tools.ant.Task.perform(Task.java:364)
[report] at org.apache.tools.ant.Target.execute(Target.java:341)
[report] at org.apache.tools.ant.Target.performTasks(Target.java:369)
[report] at org.apache.tools.ant.Project.executeSortedTargets(Project.jav
a:1216)
[report] at org.apache.tools.ant.Project.executeTarget(Project.java:1185)
[report] at org.apache.tools.ant.helper.DefaultExecutor.executeTargets(De
faultExecutor.java:40)
[report] at org.apache.tools.ant.Project.executeTargets(Project.java:1068
)
[report] at org.apache.tools.ant.Main.runBuild(Main.java:668)
[report] at org.apache.tools.ant.Main.startAnt(Main.java:187)
[report] at org.apache.tools.ant.launch.Launcher.run(Launcher.java:246)
[report] at org.apache.tools.ant.launch.Launcher.main(Launcher.java:67)
Logged In: YES
user_id=699270
Originator: NO
I am not sure that this behavior is a bug.
I get the same message com.vladium.emma.EMMARuntimeException: [CLASS_STAMP_MISMATCH] when indeed I am processing ec (emma coverage) files which have been collected against a different build than the corresponding em (emma metadata) file.
What should be changed is that when this runs in an ant build, a BuildException should be thrown so that the build stops, perhaps conditionally to a new attribute failonerror="true".
I am capturing the messages printed by emma and I check whether a coverage report has been generated to fail conditionally. But I think this ought to be in the guts of the ant task.