j-easy / easy-rules

The simple, stupid rules engine for Java
https://github.com/j-easy/easy-rules/wiki
MIT License
4.83k stars 1.04k forks source link

Runtime Execpetion with JAVA 21 (LTS) in MVEL Module #420

Open stefanbrrr0310 opened 5 months ago

stefanbrrr0310 commented 5 months ago

Hi There,

i just tried to move my project, which uses the MVEL module from Java 11 to java 21. Unfortunately i get a runtime Exception during Execution, as the Class "java.lang.Compiler", which is used during the creation of a MVELRule Condition, is not availavle in java 21. This happens in the used MVEL library. Maybe an Update of the MVEL Version solves this issue?

hisener commented 5 months ago

I think upgrading mvel2 to 2.5.0+ should resolve this issue as it drops java.lang.Compiler reference in https://github.com/mvel/mvel/commit/2eba49dee022e5fd786941be52dde89c6d3631f9.

RSapru commented 4 months ago

@stefanbrrr0310 Just wondering, if it worked for you, When I tried upgrading mvel2 version to 2.5.2.Final did not work ?

jpoisat831 commented 3 months ago

Hi, thanks for commenting this issue! I added the following block to my POM and got rid of my compilation problem, thanks to you guys!

<dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>org.mvel</groupId>
            <artifactId>mvel2</artifactId>
            <version>2.5.2.Final</version>
        </dependency>
    </dependencies>
</dependencyManagement>