Menu

Emma Offline instrumentation and ClassFormatError with Java8

Developers
Bill Smith
2016-11-14
2016-11-14
  • Bill Smith

    Bill Smith - 2016-11-14

    I'm trying to use Emma to instrument so unit test code that runs with
    a just TestNg test runner. To do this,I'm instrumenting the jar I'm
    testing with java -cp ..\jre\lib\ext\emma.jar emma instr -m overwrite
    -cp myclasses.jar. That seems to work fine. However, whenever I try
    running the tests, I get a ton of "java.lang.ClassFormatError: Illegal
    local variable table length" errors. I've tried adding
    -XX:-UseSplitVerifier, but not change in output. We are using Jre
    1.8u112.

    Instrumentation output:

    $ java -cp ..\jre\lib\ext\emma.jar emma instr -m overwrite -cp myclasses.jar
    EMMA: processing instrumentation path ...
    EMMA: instrumentation path processed in 500 ms
    EMMA: [340 class(es) instrumented, 117 resource(s) copied]
    EMMA: metadata merged into [d:\mytest\coverage.em] {in 35 ms}

    Any thoughts or suggestions?

    Regards,
    Bill

     
    • Andreas

      Andreas - 2016-11-14

      I'm afraid Emma doesn't reliably work work with Java 8.
      We switched to Jacoco. I found it also easier to integrate into Ant.
      http://www.eclemma.org/jacoco/

      On 14 Nov 2016 at 22:14, Bill Smith wrote:

      I'm trying to use Emma to instrument so unit test code that runs with
      a just TestNg test runner. To do this,I'm instrumenting the jar I'm
      testing with java -cp ..\jre\lib\ext\emma.jar emma instr -m overwrite
      -cp myclasses.jar. That seems to work fine. However, whenever I try
      running the tests, I get a ton of "java.lang.ClassFormatError: Illegal
      local variable table length" errors. I've tried adding
      -XX:-UseSplitVerifier, but not change in output. We are using Jre
      1.8u112.

      Instrumentation output:

      $ java -cp ..\jre\lib\ext\emma.jar emma instr -m overwrite -cp myclasses.jar
      EMMA: processing instrumentation path ...
      EMMA: instrumentation path processed in 500 ms
      EMMA: [340 class(es) instrumented, 117 resource(s) copied]
      EMMA: metadata merged into [d:\mytest\coverage.em] {in 35 ms}

      Any thoughts or suggestions?

      Regards,
      Bill


      Emma Offline instrumentation and ClassFormatError with Java8


      Sent from sourceforge.net because you indicated interest in https://sourceforge.net/p/emma/discussion/373867/

      To unsubscribe from further messages, please visit https://sourceforge.net/auth/subscriptions/

       

Log in to post a comment.