[ https://issues.apache.org/jira/browse/CASSANDRA-16365?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17272472#comment-17272472 ]
Ekaterina Dimitrova commented on CASSANDRA-16365: ------------------------------------------------- Hey [~mck] and [~jlewandowski], thank you for the patch. I was wondering what is your plan? Shall we commit this and open a new patch as [~mck] mentioned or there will more work done as part of this one. Please let me know if I can help with something. :) > Cannot run tests on Java 11 with coverage analysis > -------------------------------------------------- > > Key: CASSANDRA-16365 > URL: https://issues.apache.org/jira/browse/CASSANDRA-16365 > Project: Cassandra > Issue Type: Bug > Components: Build > Reporter: Jacek Lewandowski > Assignee: Jacek Lewandowski > Priority: Normal > Fix For: 4.0, 4.0.x > > Attachments: Screenshot 2020-12-24 at 14.23.13.png, Screenshot > 2020-12-24 at 14.23.57.png > > Time Spent: 10m > Remaining Estimate: 0h > > When running tests with coverage analysis on Java 11, we get the problem as > follows: > {noformat} > [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 > {noformat} > 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 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: commits-unsubscr...@cassandra.apache.org For additional commands, e-mail: commits-h...@cassandra.apache.org