Skip to content

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

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…



(I incorrectly was zeroing in on the “Unsupported class file major version 61” message without looking at the stacktrace.)

The problem (as pointed out by @Mark Rotteveel) is that glowroot is failing while trying to do some code transformation using ASM. Apparently the ClassReader in the version of ASM that is bundled in glowroot 0.13.6 doesn’t understand version 61 (Java 17) class files.

Q: How to solve this?

A: Use glowroot 0.14.0-beta.2 or later; see Alternative, build your application and its dependencies (as required) for an earlier (target) version of Java, and (maybe1) run on an earlier version of Java.

1 – It depends on whether the code transformations involve the ASM ClassReader reading Java SE classes.