Hi Vladimir,

the stack trace is definitely from a older JaCoCo version. Since 0.8.8 the 
JaCoCo version is included in the IOException. See 
https://github.com/jacoco/jacoco/pull/1217 
<https://github.com/jacoco/jacoco/pull/1217>

The version list is for jacocoAgent (runtime) while the exception happens 
during analysis. Maybe you need to update the Jenkins plugin?

Regards,
-marc

> On 23. Sep 2022, at 11:07, Vladimir Urosevic <[email protected]> 
> wrote:
> 
> Hello, 
> 
> I have problem in Jenkins. I use 0.8.8 version. I got this message in my 
> console:
> 
> jacocoAgent - The Jacoco agent to use to get coverage data. \--- 
> org.jacoco:org.jacoco.agent:0.8.7 -> 0.8.8 jacocoAnt - The Jacoco ant tasks 
> to use to get execute Gradle tasks. \--- org.jacoco:org.jacoco.ant:0.8.7 -> 
> 0.8.8      
> +--- org.jacoco:org.jacoco.core:0.8.8      |   
> +--- org.ow2.asm:asm:9.2      |   
>  +--- org.ow2.asm:asm-commons:9.2      |    |    
> +--- org.ow2.asm:asm:9.2      |    |    
> +--- org.ow2.asm:asm-tree:9.2      |    |    |   
>  \--- org.ow2.asm:asm:9.2      |    |    
> \--- org.ow2.asm:asm-analysis:9.2      |    |         
> \--- org.ow2.asm:asm-tree:9.2 (*)      |    
> \--- org.ow2.asm:asm-tree:9.2 (*)     
>  +--- org.jacoco:org.jacoco.report:0.8.8      |    
> \--- org.jacoco:org.jacoco.core:0.8.8 (*)      
> \--- org.jacoco:org.jacoco.agent:0.8.8
> 
> ...
> 
> java.lang.IllegalArgumentException: Unsupported class file major version 61   
>   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.jacoco.core.internal.instr.InstrSupport.classReaderFor(InstrSupport.java:280)
>      at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:107)     
> at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:132) Caused: 
> java.io.IOException: Error while analyzing 
> /var/lib/jenkins/jobs/vera-be/branches/jacoco/builds/14/jacoco/classes/java/test/test/RandomBeanUtil.class.
>      at org.jacoco.core.analysis.Analyzer.analyzerError(Analyzer.java:162)    
>  at org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:134)     at 
> org.jacoco.core.analysis.Analyzer.analyzeClass(Analyzer.java:157)     at 
> org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:193)     at 
> org.jacoco.core.analysis.Analyzer.analyzeAll(Analyzer.java:226)     at 
> hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:129)
>  Caused: java.io.IOException: While reading class directory: 
> /var/lib/jenkins/jobs/vera-be/branches/jacoco/builds/14/jacoco/classes     at 
> hudson.plugins.jacoco.ExecutionFileLoader.analyzeStructure(ExecutionFileLoader.java:132)
>      at 
> hudson.plugins.jacoco.ExecutionFileLoader.loadBundleCoverage(ExecutionFileLoader.java:140)
>      at hudson.plugins.jacoco.JacocoReportDir.parse(JacocoReportDir.java:110) 
>     at 
> hudson.plugins.jacoco.JacocoBuildAction.loadRatios(JacocoBuildAction.java:331)
>      at 
> hudson.plugins.jacoco.JacocoBuildAction.load(JacocoBuildAction.java:321)     
> at hudson.plugins.jacoco.JacocoPublisher.perform(JacocoPublisher.java:675)    
>  at 
> org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:80) 
>     at 
> org.jenkinsci.plugins.workflow.steps.CoreStep$Execution.run(CoreStep.java:67) 
>     at 
> org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
>      at 
> java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)     
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)     at 
> java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
>      at 
> java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
>      at java.lang.Thread.run(Thread.java:748)
> 
> I use Java17 on Jenkins. If I change to Java11 it works.
> Thanks
> 
> -- 
> 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 [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/040c01a0-61e7-4bbd-ac83-4922f72247c4n%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/040c01a0-61e7-4bbd-ac83-4922f72247c4n%40googlegroups.com?utm_medium=email&utm_source=footer>.

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jacoco/A0667498-C28E-4A87-B664-A7726E187900%40mountainminds.com.

Reply via email to