Skip to content

Instantly share code, notes, and snippets.

@bric3
Created May 5, 2021 22:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bric3/043c066fc73157463d570329ebeeb496 to your computer and use it in GitHub Desktop.
Save bric3/043c066fc73157463d570329ebeeb496 to your computer and use it in GitHub Desktop.
Jacoco and Java 15
 > Task :testjava.lang.instrument.IllegalClassFormatException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
	at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:94)
	at java.instrument/java.lang.instrument.ClassFileTransformer.transform(ClassFileTransformer.java:246)
	at java.instrument/sun.instrument.TransformerManager.transform(TransformerManager.java:188)
	at java.instrument/sun.instrument.InstrumentationImpl.transform(InstrumentationImpl.java:563)
	at java.base/java.lang.ClassLoader.defineClass2(Native Method)
	at java.base/java.lang.ClassLoader.defineClass(ClassLoader.java:1108)
	at java.base/java.security.SecureClassLoader.defineClass(SecureClassLoader.java:183)
...
Caused by: java.io.IOException: Error while instrumenting sun/util/resources/cldr/provider/CLDRLocaleDataMetaInfo.
	at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrumentError(Instrumenter.java:159)
	at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:109)
	at org.jacoco.agent.rt.internal_43f5073.CoverageTransformer.transform(CoverageTransformer.java:92)
	... 37 more
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
	at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:195)
	at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:176)
	at org.jacoco.agent.rt.internal_43f5073.asm.ClassReader.<init>(ClassReader.java:162)
	at org.jacoco.agent.rt.internal_43f5073.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:280)
	at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:75)
	at org.jacoco.agent.rt.internal_43f5073.core.instr.Instrumenter.instrument(Instrumenter.java:107)
	... 38 more

This also happens on other classes like : java/sql/SQLException

gradle/gradle#15038

Unable to run check class org.sonar.java.se.SymbolicExecutionVisitor -  on file 'src/main/java/com/blablacar/edge/api/application/support/context/EdgeRequestContext.java', To help improve the SonarSource Java Analyzer, please report this problem to SonarSource: see https://community.sonarsource.com/
org.sonar.java.bytecode.se.BytecodeEGWalker$BytecodeAnalysisException: Failed dataflow analysis for java.util.Objects#requireNonNull(Ljava/lang/Object;)Ljava/lang/Object;
	at org.sonar.java.bytecode.se.BytecodeEGWalker.getMethodBehavior(BytecodeEGWalker.java:299)
	at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:159)
	at org.sonar.java.se.xproc.BehaviorCache.get(BehaviorCache.java:131)
	at org.sonar.java.se.ExplodedGraphWalker.executeMethodInvocation(ExplodedGraphWalker.java:692)
	at org.sonar.java.se.ExplodedGraphWalker.visit(ExplodedGraphWalker.java:563)
	at org.sonar.java.se.ExplodedGraphWalker.execute(ExplodedGraphWalker.java:260)
	at org.sonar.java.se.ExplodedGraphWalker.visitMethod(ExplodedGraphWalker.java:220)
	at org.sonar.java.se.SymbolicExecutionVisitor.execute(SymbolicExecutionVisitor.java:73)
	at org.sonar.java.se.SymbolicExecutionVisitor.visitNode(SymbolicExecutionVisitor.java:63)
...
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 59
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:195)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:176)
	at org.objectweb.asm.ClassReader.<init>(ClassReader.java:162)
	at org.sonar.java.bytecode.se.MethodLookup.lookup(MethodLookup.java:68)
	at org.sonar.java.bytecode.se.MethodLookup.lookup(MethodLookup.java:60)

https://jira.sonarsource.com/browse/SONARJAVA-3505 ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment