#126 EclEmma Snapshot Does not display results

Version 2.1.2
JaCoCo (32)

After installing EclEmma as per bug 3522487, running eclemma still did not show results. Rebuilding my eclipse environment from scratch revealed a conflict with JMockit.

JMockit uses a java agent, but provides a non standard means of loading it. Standard means is to specify "-javaagent:jmockit.jar" as a jvm arg. JMockit also allows dynamic loading on jvm > 1.6 using an api provided by the jvm as long as jmockit.jar is before junit.jar in the classpath. It's this dynamic loading that cause EclEmma trouble.

When jmocket is loaded via -javaagent argument, eclemma displays results fine. If jmocket is loaded dynamically, EclEmma 2.1.1 displays results fine, but EclEmma 2.1.2 will not, the test process will not complete, and killing it will cause an error in eclipse.

The error: "'com.mountainminds.eclemma.internal.core.launching.AgentServer' has encountered a problem. Error while dumping coverage data (code 5013)." starts to make sense, seeming to indicate agent issues.

Bug 3522487: https://sourceforge.net/tracker/?func=detail&aid=3522487&group_id=177969&atid=883351


  • Marc R. Hoffmann

    This means It's probably an JaCoCo issue (the underlying code coverage library). EclEmma 2.1.2 includes a new version of JaCoCo to address another JMockit issue. With the new version the JMockit examples provided by the original big reporter run just fine.

    To debug this issue I would need an reproducer. Can you please provide an miminal Test case that shows the behavior?.

  • Marc R. Hoffmann

    • labels: 896756 --> JaCoCo
    • status: open --> pending
  • Chad McHenry

    Chad McHenry - 2012-05-10

    Sample eclipse project showing error

  • Chad McHenry

    Chad McHenry - 2012-05-10

    I've attached a sample eclipse project. it uses maven to import the junit4 and jmockit dependencies. You should be able to import it into eclipse and run tests via Run or Debug, but if you try using EclEmma, it will not complete, nor show any results.

    Going into the run configurations for MainTest, move the -javaagent argument (and update for your username/system) from "Program Arguments" to be a "VM argument". Applying that change should allow the tests to be run correctly via EclEmma

  • Chad McHenry

    Chad McHenry - 2012-05-10
    • status: pending --> open
  • Marc R. Hoffmann

    • status: open --> closed-wont-fix
  • Marc R. Hoffmann

    Sorry for the delayed answer, somehow this issue disappeared from my todo list.

    This is a known limitation. If classes are modified at runtime JaCoCo is unable to mach them with the classes at reporting time. If a agent is explicitely specified EclEmma tries to insert the code coverage agent first, so it still sees the original class files.

    Also the -javaagent option is always an VM argument. If you add it to "Program Arguments" it has simply no impact on the JVM,


Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks