Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Unsupported class file major version 61

I am trying to integrate Glowroot into my Java application. Unfortunately, I get the following error:

2022-05-13 09:25:57.777 ERROR o.g.a.w.PointcutClassFileTransformer - Unsupported class file major version 61
java.lang.IllegalArgumentException: Unsupported class file major version 61
    at org.glowroot.agent.shaded.org.objectweb.asm.ClassReader.<init>(ClassReader.java:196)

Neither Glowroot nor my application seem to use gradle so I have no idea where this incompatibility is coming from.

Have you got any idea on how I could find the source of the incompatibility and then how I could fix it?

Thank you!

EDIT: I use Glowroot in the version 0.13.6 .

Second edit: Seems like the version of glowroot was the issue...

like image 715
Moritz Avatar asked Sep 11 '25 18:09

Moritz


2 Answers

Also with Jacoco

This error also happens when upgrading to java 17 and having Jacoco 0.8.5. It may complain about some class file that cannot understand.

Just upgrade Jacoco to 0.8.8 or above and you are good to go.

like image 163
manuelvigarcia Avatar answered Sep 14 '25 10:09

manuelvigarcia


The error "unsupported class file major version 61" just means that there's some library that's not supported for Java 17. Read this to understand - https://mkyong.com/java/java-unsupported-class-file-major-version-61/

The stack trace above this error will tell you which dependency is that. You'll need to upgrade that dependency to the Java 17 compliant one.

like image 40
Sankalp Avatar answered Sep 14 '25 10:09

Sankalp