When I compile my project in eclipse indigo using JDK 7, I get the following error dialog

with the following stacktrace
Exception in thread "main" java.lang.VerifyError: Expecting a stackmap frame at branch target 32 in method ... at offset 0     at java.lang.Class.getDeclaredMethods0(Native Method)     at java.lang.Class.privateGetDeclaredMethods(Unknown Source)     at java.lang.Class.getMethod0(Unknown Source)     at java.lang.Class.getMethod(Unknown Source)     at sun.launcher.LauncherHelper.getMainMethod(Unknown Source)     at sun.launcher.LauncherHelper.checkAndLoadMain(Unknown Source)   I've found a relevant bug here and used the suggested workaround of using jvm option -XX:-UseSplitVerifier and although it works, this bug still confuses me.
Does anyone know why this is happening and why the workaround...works?
The project compiles fine using JDK 6.
Bug 353467 speaks about "using -XX:-UseSplitVerifier to activate the old verifier".
 That is consistent with the JDK TM 6 Adoption Guide which describes that option as:
Traditional verifier can be forced with the
-XX:-UseSplitVerifierflag.Missing or incorrect
StackMapTableattributes for version50.0class files can result inVerifyErrorexceptions.
Tools that rewrite bytecode in version50.0class files and do not correctly update theStackMapTablemay fail to verify and trigger exceptions.
So the comment from 2011-10-03 does point out that:
AspectJ now auto activates the previously optional setting to create stackmaps if the classes are Java7.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With