Hi Srinivas,

the interesting part of the stack trace is here:

    [junit] Caused by: java.lang.ArrayIndexOutOfBoundsException: 287
    [junit]     at 
org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader.readUtf(ClassReader.java:3695)
    [junit]     at 
org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader.readUtf(ClassReader.java:3675)
    [junit]     at 
org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader.readUTF8(ClassReader.java:3656)
    [junit]     at 
org.jacoco.agent.rt.internal_b6258fc.asm.ClassReader.readMethod(ClassReader.java:1388)

The ASM library cannot read the class file. This is most likely because the 
class file has a syntax error. This can be because the class file was compiled 
with an error (actually some javac versions created invalid class files) or 
there is another agent which modifies the class files in an invalid way.

Can you please provide the class file 
org/apache/logging/log4j/spi/AbstractLogger.class which is used in your build? 
To be sure you can add the classdumpdir option 
(https://www.jacoco.org/jacoco/trunk/doc/agent.html 
<https://www.jacoco.org/jacoco/trunk/doc/agent.html>) so you will get the exact 
version of the class file which is seen by the JaCoCO agent.

Regards,
-marc

> On 11. Jul 2022, at 05:24, 'Petluri Srinivasa Chakravarthi' via JaCoCo and 
> EclEmma Users <[email protected]> wrote:
> 
> Hello Marc,
>               Thank for responding. Please find the attached error file. But 
> same code is executing from eclipse
> without any error using EclEmma V3.1.0. Junit tests are running similarly in 
> both(ANT and eclipse)  Only facing issue with code coverage report. 
> ANT(Jacoco) generated report is showing 0% for entire project. I tried with 
> offline instrumenting too.
>             
> Thanks in Advance.
>  
> Regards,
> Srinivas P.
>  
> From: [email protected] <mailto:[email protected]> 
> <[email protected] <mailto:[email protected]>> On Behalf Of Marc 
> Hoffmann
> Sent: 09 July 2022 03:41
> To: JaCoCo and EclEmma Users <[email protected] 
> <mailto:[email protected]>>
> Subject: [java code coverage] Re: Getting Error Jacco- ANT
>  
> You don't often get email from [email protected] 
> <mailto:[email protected]>. Learn why this is important 
> <https://aka.ms/LearnAboutSenderIdentification>  
> Hi Srinivas,
>  
> can you please provide the full stack trace?
>  
> Thanks,
> -marc
>  
>  
> Petluri Srinivasa Chakravarthi schrieb am Freitag, 8. Juli 2022 um 08:56:57 
> UTC+2:
> Hello, 
>        I a m getting following error while integrating Jacoco in ANT.
> java.lang.instrument.IllegalClassFormatException: Error while instrumenting 
> org/apache/logging/log4j/spi/AbstractLogger with JaCoCo 
> 0.8.8.202204050719/5dcf34a.
>  
> used Log4j Jars:
> log4j-api-2.15.0.jar and log4j-api-2.15.0.jar
> Jacoco version used 0.8.8
>  
> Regards,
> Srinivas P.
> -- 
> You received this message because you are subscribed to a topic in the Google 
> Groups "JaCoCo and EclEmma Users" group.
> To unsubscribe from this topic, visit 
> https://groups.google.com/d/topic/jacoco/RelQPhYOe_0/unsubscribe 
> <https://groups.google.com/d/topic/jacoco/RelQPhYOe_0/unsubscribe>.
> To unsubscribe from this group and all its topics, send an email to 
> [email protected] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/07bc5d4c-65a7-47ee-97c2-bd075f33260fn%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/jacoco/07bc5d4c-65a7-47ee-97c2-bd075f33260fn%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] 
> <mailto:[email protected]>.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/jacoco/BMXPR01MB077529827C0D047AE4FAA7F199879%40BMXPR01MB0775.INDPRD01.PROD.OUTLOOK.COM
>  
> <https://groups.google.com/d/msgid/jacoco/BMXPR01MB077529827C0D047AE4FAA7F199879%40BMXPR01MB0775.INDPRD01.PROD.OUTLOOK.COM?utm_medium=email&utm_source=footer>.
> <Error.txt>

-- 
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/9ADD249A-2825-4189-90B1-B1048A7E3C2C%40mountainminds.com.
  • [java code c... 'Petluri Srinivasa Chakravarthi' via JaCoCo and EclEmma Users
    • [java c... Marc Hoffmann
      • RE:... 'Petluri Srinivasa Chakravarthi' via JaCoCo and EclEmma Users
        • ... Marc Hoffmann

Reply via email to