The problem is the following:
* we read classfiles
* they have a bytecode version, that depends on the version of Java,
those classfiles have been compiled with
* we use the asm lib to read those class files
* asm can only read classfiles compatible with the bytecode version on
the release of that asm lib
* Java nowadays changes the bytecode version with almost every major release
* if the bytecode version is too new you run into problems like:
>> Caused by: java.lang.IllegalArgumentException: Unsupported class
>> file major version 69
>> at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:200)
One thing that helps: upgrade Groovy.
There is in theory a solution to this by using the new class file API
from Java. But the next lts version of Java that supports the class file
API is Java 25
bye Jochen
On 10/10/25 16:15, Tommy Svensson wrote:
Sorry, but I don't have anything to say about the specific problem!
That said I found this: https://openjdk.org <https://openjdk.org>
Is it possible the open source world can take this JVM code and take it
in an own, fully backwards compatible direction, so that we can avoid
problems like this ?
Tommy Svensson
[email protected] <mailto:[email protected]>
Från: Blake McBride <[email protected]> <mailto:[email protected]>
Svara: [email protected] <[email protected]>
<mailto:[email protected]>
Datum: 10 oktober 2025 at 01:26:18
Till: [email protected] <[email protected]>
<mailto:[email protected]>
Ämne: Re: Error in Java 25
I fixed the problem by upgrading to Groovy 4.0.28
On Thu, Oct 9, 2025 at 4:45 PM Blake McBride <[email protected]
<mailto:[email protected]>> wrote:
Hello,
I am trying to run an app that runs fine under Java 21 but will
not run under Java 25.
The problem appears to be Groovy.
Sure appreciate any help.
I am running the following:
Groovy: 4.0.26
Java: 25
Apache tomcat: 11.0.8
I get the error when trying to run a .groovy file. So, it isn't
a .class file. The Groovy file has not been compiled. Again,
this code works fine under Java 8, 11, 17, and 21.
The error under Java 25:
09-Oct-2025 16:27:47.947 SEVERE [main]
org.apache.catalina.core.StandardContext.listenerStart Exception
sending context initialized event to listener instance of class
[org.kissweb.restServer.StartupListener]
BUG! exception in phase 'semantic analysis' in source unit '/
drive1/ROOT/home/blake/Stack360/Kiss/src/main/backend/
KissInit.groovy' Unsupported class file major version 69
at
org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:901)
at
org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:692)
at
org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:666)
at
groovy.lang.GroovyClassLoader.doParseClass(GroovyClassLoader.java:365)
at
groovy.lang.GroovyClassLoader.lambda$parseClass$2(GroovyClassLoader.java:314)
at
org.codehaus.groovy.runtime.memoize.StampedCommonCache.compute(StampedCommonCache.java:163)
at
org.codehaus.groovy.runtime.memoize.StampedCommonCache.getAndPut(StampedCommonCache.java:154)
at
groovy.lang.GroovyClassLoader.parseClass(GroovyClassLoader.java:314)
at org.kissweb.restServer.GroovyClass.<init>(GroovyClass.java:59)
at
org.kissweb.restServer.GroovyService.loadGroovyClass(GroovyService.java:400)
at
org.kissweb.restServer.GroovyService.internalGroovy(GroovyService.java:265)
at
org.kissweb.restServer.MainServlet.initializeSystem(MainServlet.java:352)
at
org.kissweb.restServer.StartupListener.contextInitialized(StartupListener.java:37)
at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4015)
at
org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:4438)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:566)
at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:652)
at
org.apache.catalina.startup.HostConfig.deployWAR(HostConfig.java:926)
at
org.apache.catalina.startup.HostConfig$DeployWar.run(HostConfig.java:1842)
at java.base/
java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:545)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:125)
at
org.apache.catalina.startup.HostConfig.deployWARs(HostConfig.java:730)
at
org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:381)
at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1582)
at
org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:265)
at
org.apache.catalina.util.LifecycleBase.fireLifecycleEvent(LifecycleBase.java:109)
at
org.apache.catalina.util.LifecycleBase.setStateInternal(LifecycleBase.java:389)
at
org.apache.catalina.util.LifecycleBase.setState(LifecycleBase.java:336)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:743)
at
org.apache.catalina.core.StandardHost.startInternal(StandardHost.java:769)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1164)
at
org.apache.catalina.core.ContainerBase$StartChild.call(ContainerBase.java:1160)
at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:328)
at
org.apache.tomcat.util.threads.InlineExecutorService.execute(InlineExecutorService.java:75)
at java.base/
java.util.concurrent.AbstractExecutorService.submit(AbstractExecutorService.java:149)
at
org.apache.catalina.core.ContainerBase.startInternal(ContainerBase.java:716)
at
org.apache.catalina.core.StandardEngine.startInternal(StandardEngine.java:203)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at
org.apache.catalina.core.StandardService.startInternal(StandardService.java:412)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at
org.apache.catalina.core.StandardServer.startInternal(StandardServer.java:866)
at
org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:164)
at org.apache.catalina.startup.Catalina.start(Catalina.java:759)
at java.base/
jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
at java.base/java.lang.reflect.Method.invoke(Method.java:565)
at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:342)
at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:473)
Caused by: java.lang.IllegalArgumentException: Unsupported class
file major version 69
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:200)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:180)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:166)
at groovyjarjarasm.asm.ClassReader.<init>(ClassReader.java:288)
at
org.codehaus.groovy.ast.decompiled.AsmDecompiler.parseClass(AsmDecompiler.java:83)
at
org.codehaus.groovy.control.ClassNodeResolver.findDecompiled(ClassNodeResolver.java:255)
at
org.codehaus.groovy.control.ClassNodeResolver.tryAsLoaderClassOrScript(ClassNodeResolver.java:193)
at
org.codehaus.groovy.control.ClassNodeResolver.findClassNode(ClassNodeResolver.java:175)
at
org.codehaus.groovy.control.ClassNodeResolver.resolveName(ClassNodeResolver.java:129)
at
org.codehaus.groovy.control.ResolveVisitor.resolveToOuter(ResolveVisitor.java:782)
at
org.codehaus.groovy.control.ResolveVisitor.resolve(ResolveVisitor.java:423)
at
org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1240)
at
org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:258)
at
org.codehaus.groovy.control.CompilationUnit.lambda$addPhaseOperations$3(CompilationUnit.java:207)
at
org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:897)
... 50 more