trinodb / trino-gateway

Home Page:https://trinodb.github.io/trino-gateway/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Update to Java 21

mosabua opened this issue · comments

Follow along the Java 21 requirement update for Trino itself. Currently the codebase does not compile with Java 21. Probably needs more dependency updates as well.

Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project gateway-ha: Fatal error compiling: java.lang.NoSuchFieldError: Class com.sun.tools.javac.tree.JCTree$JCImport does not have member field 'com.sun.tools.javac.tree.JCTree qualid' -> [Help 1]
org.apache.maven.lifecycle.LifecycleExecutionException: Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.11.0:compile (default-compile) on project gateway-ha: Fatal error compiling

Might be just need for jvm config update or so

I had the same issue ...and the solution was update lombok dependecy :

   <dependency>
        <groupId>org.projectlombok</groupId>
        <artifactId>lombok</artifactId>
        <version>1.18.30</version>
        <type>jar</type>
    </dependency>

We removed lombok usage completely, but there are still build/test failures with Java 21.

As of 2024-01-05 I get these test errors.

[ERROR] Errors:
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngine:70 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngine:70 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngine:70 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngine:70 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineFileChange:128 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineNoMatch:100 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineNoMatch:100 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineNoMatch:100 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineNoMatch:100 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineSpecialLabel:84 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineSpecialLabel:84 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineSpecialLabel:84 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestRoutingGroupSelector.testByRoutingRulesEngineSpecialLabel:84 » NoClassDefFound Could not initialize class org.mvel2.compiler.ExpressionCompiler
[ERROR] TestTcpChecks.testTcpRuleCheck:58 » NoClassDefFound java/lang/Compiler

Probably needs more dependency updates ....