Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade jacoco to version 0.8.4 as needed for OpenJDK 11 #39

Closed
vortex314 opened this issue Jun 22, 2022 · 1 comment
Closed

Upgrade jacoco to version 0.8.4 as needed for OpenJDK 11 #39

vortex314 opened this issue Jun 22, 2022 · 1 comment

Comments

@vortex314
Copy link

Describe the bug
The build fails with OpenJDK 11

Expected behavior

T E S T S

Exception in thread "main" java.lang.reflect.InvocationTargetException
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.base/java.lang.reflect.Method.invoke(Method.java:566)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndStartAgent(InstrumentationImpl.java:513)
at java.instrument/sun.instrument.InstrumentationImpl.loadClassAndCallPremain(InstrumentationImpl.java:525)
Caused by: java.lang.RuntimeException: Class java/lang/UnknownError could not be instrumented.
at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:140)
at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:101)
at org.jacoco.agent.rt.internal_c13123e.PreMain.createRuntime(PreMain.java:55)
at org.jacoco.agent.rt.internal_c13123e.PreMain.premain(PreMain.java:47)
... 6 more
Caused by: java.lang.NoSuchFieldException: $jacocoAccess
at java.base/java.lang.Class.getField(Class.java:1999)
at org.jacoco.agent.rt.internal_c13123e.core.runtime.ModifiedSystemClassRuntime.createFor(ModifiedSystemClassRuntime.java:138)
... 9 more
*** java.lang.instrument ASSERTION FAILED ***: "result" with message agent load/premain call failed at ./src/java.instrument/share/native/libinstrument/JPLISAgent.c line: 422
FATAL ERROR in native method: processing of -javaagent failed, processJavaStart failed
/bin/sh: line 1: 7182 Abort trap: 6 /Library/Java/JavaVirtualMachines/adoptopenjdk-11.jdk/Contents/Home/bin/java -javaagent:/Users/mg61dd/.m2/repository/org/jacoco/org.jacoco.agent/0.8.1/org.jacoco.agent-0.8.1-runtime.jar=destfile=/Users/mg61dd/workspace/XsdParser/target/jacoco.exec -jar /Users/mg61dd/workspace/XsdParser/target/surefire/surefirebooter8702145386574356607.jar /Users/mg61dd/workspace/XsdParser/target/surefire/surefire7793138380492632711tmp /Users/mg61dd/workspace/XsdParser/target/surefire/surefire_02303034023949158715tmp
Results :
Tests run: 0, Failures: 0, Errors: 0, Skipped: 0
Library Version
What is the version that you are using?
master bt-ranch
Additional context
Upgrading to jacoco 0.8.4 solved that issue

@lcduarte
Copy link
Member

Hello,

I've updated the jacoco plugin from 0.8.1 to 0.8.4. Both the build and the tests are working with Java 11.0.6. The project itself is still released in Java 8.

Thanks for using the library!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants