Could you try the latest stable version, i.e. 4.0.21. As the following configuration shows, Java 21 is supported by Groovy 4.0.21.
https://github.com/apache/groovy/blob/c4615cec66ed07c7f0d9c8c73ee9a6dbda147952/.github/workflows/groovy-build-test-ea.yml#L32 Cheers, Daniel Sun On 2024/05/16 10:19:56 Johan Compagner via users wrote: > Hi > > We are using Jasper that bundles Groovy (4.0.8) but are getting: > > org.codehaus.groovy.GroovyBugError: BUG! exception in phase 'semantic > analysis' in source unit > 'calculator_fin_lay_003_f17d19ddf85e94f0e0558ad16053ed00cbb6578a89a5f69df26044d903df00e6' > Unsupported class file major version 65 > at > org.codehaus.groovy.control.CompilationUnit$ISourceUnitOperation.doPhaseOperation(CompilationUnit.java:900) > ~[groovy-4.0.8.jar:4.0.8] > at > org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:692) > ~[groovy-4.0.8.jar:4.0.8] > at > org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:666) > ~[groovy-4.0.8.jar:4.0.8] > at > net.sf.jasperreports.compilers.JRGroovyCompiler.compileUnits(JRGroovyCompiler.java:112) > ~[jasperreports-6.21.0.jar:6.21.0-unknown] > at > net.sf.jasperreports.engine.design.JRAbstractCompiler.compileReport(JRAbstractCompiler.java:231) > ~[jasperreports-6.21.0.jar:6.21.0-unknown] > > > now i tried to search and find anything related what groovy really is > supported on what version > > and i can't really find anything related to this.. I do get go gradle (and > you need 8.5 for java 21) but nothing really related to the actual groovy > version and what groovy is supporting (not from but until) > > > I do find more people with the same problem, but no real answers on those > questions.. > > johan > > > > > -- > Johan Compagner > Servoy >