Grade version: 9.2.1
JVM: Amazon Corretto JDK 25 (25.0.2+10-LTS)
Architecture: aarch64
We are using the com.vaadin:vaadin-gradle-plugin:25.0.5 on a project. The project is built with Java 25. The Vaading plugin uses ASM against the Java 25 bytecode.
We are getting the following exception
Caused by: java.lang.IllegalArgumentException: Unsupported class file major version 69
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:200)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:180)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:166)
at org.objectweb.asm.ClassReader.<init>(ClassReader.java:288)
When the task executes.
The output from ./gradlew :ui:buildEnvironment shows that the vaading plugin depends on asm 9.9.1 (See bottom of the tree below.)
classpath
\--- com.vaadin:vaadin-gradle-plugin:25.0.5
+--- com.vaadin:hilla-gradle-plugin:25.0.5
| \--- com.vaadin:flow-gradle-plugin:25.0.6
| \--- com.vaadin:flow-plugin-base:25.0.6
| +--- com.vaadin:flow-server:25.0.6
| | +--- com.vaadin:flow-push:25.0.6
| | | \--- com.vaadin.external.atmosphere:atmosphere-runtime:3.0.5.slf4jvaadin1
| | | \--- org.slf4j:slf4j-api:1.7.35 -> 2.0.17
| | +--- com.vaadin:signals:25.0.6
| | | +--- org.slf4j:slf4j-api:2.0.17
| | | \--- tools.jackson.core:jackson-databind:3.0.4
| | | +--- com.fasterxml.jackson.core:jackson-annotations:2.20
| | | +--- tools.jackson.core:jackson-core:3.0.4
| | | | \--- tools.jackson:jackson-bom:3.0.4
| | | | +--- com.fasterxml.jackson.core:jackson-annotations:2.20 (c)
| | | | +--- tools.jackson.core:jackson-core:3.0.4 (c)
| | | | \--- tools.jackson.core:jackson-databind:3.0.4 (c)
| | | \--- tools.jackson:jackson-bom:3.0.4 (*)
| | +--- org.jspecify:jspecify:1.0.0
| | +--- org.slf4j:slf4j-api:2.0.17
| | +--- tools.jackson.core:jackson-core:3.0.4 (*)
| | +--- tools.jackson.core:jackson-databind:3.0.4 (*)
| | +--- org.jsoup:jsoup:1.21.2
| | +--- org.ow2.asm:asm:9.9.1
ASM 9.91 should work with Java 25 however when I add the following task to build.gradle.
tasks.register("printAsmSource") {
doLast {
def cr = org.objectweb.asm.ClassReader.class
def loc = cr.protectionDomain.codeSource?.location
println "ClassReader loaded from: $loc"
}
}
And execute it. I see that an earlier asm library is being used.
> Task :ui:printAsmSource
ClassReader loaded from: file:/Users/shutchinson/.gradle/caches/modules-2/files-2.1/org.ow2.asm/asm/9.7.1/f0ed132a49244b042cd0e15702ab9f2ce3cc8436/asm-9.7.1.jar
My guess is that this version must be coming from Gradle itself.
Could anyone confirm
- Is my guess correct
- Is there anything I can do to force the correct ASM version for my plugin