PRASANTHMV PRASANTHMV - 7 months ago 27
Java Question

What will be reason for Classformat Exception?

[junit] Illegal local variable table length 87 in method com.ne
tspective.axiom.repo.couchbase.CouchBaseConfiguration.<init>()V
[junit] java.lang.ClassFormatError: Illegal local variable tabl
e length 87 in method com.netspective.axiom.repo.couchbase.CouchBas
eConfiguration.<init>()V


I am using Java 1.8 . I have written a junit test case. Test is running through ant task.
Junit is 4.11 and ant is 1.9.1 .

The above error is coming while running the rest. What will be reason. Configuration file supplies all connection properties. Is there any special case with junit under java 8?

Please help me.

Answer

Someone has asked (almost) the same question. He solved it by adding the following JVM arguments:

-XX:-UseSplitVerifier

Here you have the question of this user on SO. And the problem is somewhat explained here.