Note that there are some explanatory texts on larger screens.

plurals
  1. POTestng, Emma, Cobertura, coverage and JDK 7 result in ClassFormatError and VerifyError
    text
    copied!<p>I have switched to the newest JDK 7 and I am having problems with running testng unit test on byte code that is fiddled by emma coverage tool. None of my test cases are run correctly and for most of them I am receiving such errors.</p> <pre><code> java.lang.ClassFormatError: Illegal local variable table length 10 in method measurement.meter.AbstractSerialPortMeter.&lt;init&gt;(Lmeasurement/meter/SerialPort;)V at measurement.meter.Elc3133aTest.setUp(Elc3133aTest.java:42) </code></pre> <p>I have found an article here <a href="http://weblogs.java.net/blog/forax/archive/2011/02/12/jsr-292-goodness-fast-code-coverage-tool-less-10k" rel="noreferrer">JSR 292 Goodness Fast Code Coverage Tool Less 10k</a>, which is saying that "JSR 292 introduces a new bytecode instruction invokedynamic but also several new kind of constant pool constants. Which means that most of the tools that parse bytecodes like ASM, BCEL, findbugs or EMMA will need to be updated to be java 7 compatible."</p> <p>Checked Emma homepage, but it looks like it has not been updated for a long long time.</p> <p>Has anybody solved a similar problem?</p> <p>I have also tried with Cobertura. It looks to work a bit better but I am getting a lot of exceptions of type <code>VerifyError</code>.</p> <pre><code>java.lang.VerifyError: Expecting a stackmap frame at branch target 85 in method measurement.meter.AbstractSerialPortMeter.close()V at offset 26 at measurement.meter.AbstractSerialPortMeterTest.setUp(AbstractSerialPortMeterTest.java:27) </code></pre>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload