Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

java.lang.VerifyError: Expecting a stackmap frame at branch target with Cobertura using mojo

I am using Cobertura for my code coverage but while running the test cases all of the test cases are getting failed with below error when I run the test cases using a maven build.

 Reason:
    Expected stackmap frame at this location.
  Bytecode:
    0x0000000: 033d 11ff ff3e 125b 1102 1fb8 0061 2a2b
    0x0000010: 1102 1f3d 1100 003e c600 1912 5b1c 1d04
    0x0000020: b800 b511 ffff 3e2b b600 bbc0 00b7 a700
    0x0000030: 141d 9b00 0f12 5b1c 1d03 b800 b511 ffff
    0x0000040: 3e01 b500 c012 5b11 0220 b800 61b1  

But when I run the same test cases using Eclipse run as JUnit command it works fine.

like image 759
Siva Avatar asked Dec 07 '25 03:12

Siva


2 Answers

In Eclipse just Right Click & in in cover configurations & add
-XX:-UseSplitVerifier to the VM Arguments in the arguments tab

like image 64
Ashutosh Pandey Avatar answered Dec 08 '25 16:12

Ashutosh Pandey


In my case, using AdoptJDK 11, I was able to get rid of the error using the -noverify VM argument. However, Cobertura doesn't support Java 1 :(

For Gradle users:

test {
    jvmArgs '-noverify'
}
like image 27
Yuri Avatar answered Dec 08 '25 15:12

Yuri



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!