Cannot process instrumented class worker/org/gradle/api/JavaVersion. Please supply original non-instrumented classes

871 views
Skip to first unread message

James Cross

unread,
Jan 8, 2021, 12:40:18 PM1/8/21
to JaCoCo and EclEmma Users
Hi,

When running jacoco on a multi-module Gradle build I'm getting many failures of the form: Caused by: java.lang.IllegalStateException: Cannot process instrumented class worker/org/gradle/api/JavaVersion. Please supply original non-instrumented classes. for various different classes.

I'm using Gradle wrapper 6.6.1, latest Jacoco plugin version.

From the root Gradle file:

tasks.withType<JacocoReport> {
  sourceSets(sourceSets.main.get())
  executionData(tasks.test.get())
  reports {
    xml.isEnabled = true
    html.destination = file("${buildDir}/reports/jacoco/html")
    xml.destination = file("${buildDir}/reports/jacoco/xml")
  }
}

Then gradle clean cleanClasses buildTests results in these errors

Marc Hoffmann

unread,
Jan 14, 2021, 6:11:26 AM1/14/21
to JaCoCo and EclEmma Users
Hi,

the problem is exactly what the error message says: JaCoCo need the *original* class files. Probably you have some other task that replaced them with offline-instrumentation (we do not recommend using so, the JaCoCo agent is the preferred way as no class files are modified on disk).

Please understand that the Gradle integration of JaCoCo is done by the Gradle project. So maybe you look at their documentation how to setup their tasks correctly.

Regards,
-marc

--
You received this message because you are subscribed to the Google Groups "JaCoCo and EclEmma Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jacoco+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jacoco/c70fcd63-aa31-4905-be33-1063e6a40e25n%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages