Details
-
Bug
-
Status: Resolved
-
Normal
-
Resolution: Fixed
-
None
-
Code - Bug - Unclear Impact
-
Low
-
Low Hanging Fruit
-
User Report
-
All
-
None
-
Description
When running tests with coverage analysis on Java 11, we get the problem as follows:
[junit-timeout] FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed [junit-timeout] Exception in thread "main" java.lang.reflect.InvocationTargetException [junit-timeout] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [junit-timeout] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [junit-timeout] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [junit-timeout] at java.base/java.lang.reflect.Method.invoke(Method.java:566) [junit-timeout] at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513) [junit-timeout] at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525) [junit-timeout] Caused by: java.lang.RuntimeException: Class java/util/UUID could not be instrumented. [junit-timeout] at org.jacoco.agent.rt.internal_b0d6a23.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:139) [junit-timeout] at org.jacoco.agent.rt.internal_b0d6a23.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:100) [junit-timeout] at org.jacoco.agent.rt.internal_b0d6a23.PreMain.createRuntime(PreMain.java:55) [junit-timeout] at org.jacoco.agent.rt.internal_b0d6a23.PreMain.premain(PreMain.java:47) [junit-timeout] ... 6 more [junit-timeout] Caused by: java.lang.NoSuchFieldException: $jacocoAccess [junit-timeout] at java.base/java.lang.Class.getField(Class.java:1999) [junit-timeout] at org.jacoco.agent.rt.internal_b0d6a23.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:137) [junit-timeout] ... 9 more [junit-timeout] *** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
It is caused by too old Jacoco which does seem to work well with Java 11. Upgrading Jacoco to the newest version 0.8.6 fixes the problem
Attachments
Attachments
Issue Links
- blocks
-
CASSANDRA-16369 JaCoCo reports on all unit test jobs on ci-cassandra.a.o
- Open
- relates to
-
CASSANDRA-16413 Byteman fails to install injections after Jacoco upgrade
- Resolved