3

I have switched to the newest JDK 7 and I having a problem of running of emma code coverage using ant. It throws the following error:

emma:
 [emmajava] EMMA: no coverage data collected at runtime [all reports will be empty]
 [emmajava] [EMMA v2.0, build 5312]
 [emmajava] emmarun: [MAIN_METHOD_NOT_FOUND] application class does not have a runnable public main() method
 [emmajava] Exception in thread "main" com.vladium.emma.EMMARuntimeException: [MAIN_METHOD_NOT_FOUND] application class does not have a runnable public main() method
 [emmajava]     at com.vladium.emma.rt.AppRunner._run(AppRunner.java:497)
 [emmajava]     at com.vladium.emma.rt.AppRunner.run(AppRunner.java:97)
 [emmajava]     at com.vladium.emma.runCommand.run(runCommand.java:247)
 [emmajava]     at emmarun.main(emmarun.java:27)
 [emmajava] Caused by: java.lang.ClassFormatError: Illegal local variable table length 5 in method <init>()V
 [emmajava]     at java.lang.Class.getDeclaredMethods0(Native Method)
 [emmajava]     at java.lang.Class.privateGetDeclaredMethods(Unknown Source)
 [emmajava]     at java.lang.Class.getMethod0(Unknown Source)
 [emmajava]     at java.lang.Class.getMethod(Unknown Source)
 [emmajava]     at com.vladium.emma.rt.AppRunner._run(AppRunner.java:493)
 [emmajava]     ... 3 more

I have read this question about the problem for resolving this error. But I cant update emma plugin due to following error.

No repository found at http://download.eclipselab.org/eclemma/beta/2.0.0/update/.
No repository found at http://download.eclipselab.org/eclemma/beta/2.0.0/update/.

How can I resolve this error?

How can I run emma code coverage in JDK 1.7?

Can anyone help me?

Community
  • 1
  • 1
Ami
  • 4,241
  • 6
  • 41
  • 75
  • Which EclEmma version are you using? – Joachim Sauer Dec 20 '12 at 11:07
  • @assylias..no..I have ant script tool.I do not have idea about maven.Is there need to maven for code coverage? – Ami Dec 20 '12 at 11:11
  • @JoachimSauer I have used this EclEmma version 2.2.0.201210261515. – Ami Dec 20 '12 at 11:17
  • Did you try [the answer](http://stackoverflow.com/a/9583305/390513) has most votes? – Kane Dec 24 '12 at 05:14
  • @Kane thanks.That answer related to maven+cobertura plugin.I have used emma plugin. – Ami Dec 24 '12 at 05:47
  • I think it's same. You can specify the vm argument mentioned in that answer in your ant script when calling emma. – Kane Dec 24 '12 at 05:53
  • No @Kane.I have vm arguments for -XX:-UseSplitVerifier.but again same error(above).http://stackoverflow.com/questions/4156147/how-do-i-set-ant-opts-under-eclipse. I have referred this link for adding jvm arguments into eclipse. – Ami Dec 24 '12 at 06:33
  • I think it's different. The run configuration is specifying a vm argument to run ANT. I think you ant script might forks another vm to run emma, make sure add that argument when running emma. – Kane Dec 27 '12 at 03:14

1 Answers1

0

Adding the following inside <emmajava> solves the problem:

<jvmarg value="-XX:-UseSplitVerifier"/>
lifus
  • 8,074
  • 1
  • 19
  • 24
Frank Fu
  • 778
  • 4
  • 8
  • 12
  • No.its not working.i have added this line junit target in ant script.still it shows same error.[or] if i did wrong plz correct me.where am i put this code? – Ami Feb 19 '13 at 14:03