0
[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.

Trevi Awater
  • 2,387
  • 2
  • 31
  • 53
PRASANTHMV
  • 299
  • 4
  • 17

1 Answers1

1

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.

Community
  • 1
  • 1
ihsan
  • 576
  • 2
  • 5
  • 18
  • But this support is removed from java 8 .Java HotSpot(TM) 64-Bit Server VM warning: ignoring option UseSplitV erifier; support was removed in 8.0 – PRASANTHMV Nov 03 '14 at 08:25
  • 1
    Oh, in that case, can you try to use the `-noverify` JVM argument? – ihsan Nov 03 '14 at 09:00
  • How is it used with ant ? – PRASANTHMV Nov 03 '14 at 09:51
  • Which IDE are you using? – ihsan Nov 03 '14 at 10:29
  • I have never needed to use that parameter, but doesn't it work like you did for the `-xx:-UseSplitVerifier`? If not, try this: http://stackoverflow.com/questions/7579776/how-to-set-jvm-parameters-for-junit-unit-tests -- Check the answer with the maven one – ihsan Nov 03 '14 at 13:20
  • 1
    thanks Mr.Ihsan.. its worked for me .. i had given This link is usefull : http://www.takipiblog.com/oracles-latest-java-8-update-broke-your-tools-how-did-it-happen/ – PRASANTHMV Nov 04 '14 at 09:03
  • is the correct config. Prasanthmv missed the "-" – AbhishekAsh Apr 19 '16 at 08:47