ClassDefNotFound for java.lang.Compiler when running tests

2,194 views
Skip to first unread message

Glenn Buckholtz

unread,
Dec 15, 2023, 3:40:54 PM12/15/23
to Drools Setup
I have a clean Windows 11 machine, installed VSCode, and Java 21.  I have a basic project using a dmn file and a scesim file.  The problem occurs when I try to run the scesim test with mvn test.   I get the following error:

: Execution default-build of goal org.kie:kie-maven-plugin:8.39.0.Final:build failed: A required class was missing while executing org.kie:kie-maven-plugin:8.39.0.Final:build: java/lang/Compiler


It is a confusing error because it is the java compiler generating the error that it can't find java.lang.Compiler.  

Is this a problem anyone else has encountered?  Does anyone have a solution for this?

vsoma

unread,
Jan 10, 2024, 9:12:14 PM1/10/24
to Drools Setup
Same error occurs with Drools 7.73.0 as well. It turns out that java.lang.Compiler was deprecated in Java 9, and has been removed in Java 21 as per https://bugs.openjdk.org/browse/JDK-8205129.
Has this been addressed in a more recent version of Drools 8.x?

Glenn Buckholtz

unread,
Jan 15, 2024, 4:12:56 PM1/15/24
to Drools Setup
Good Catch!    

  Is there a GitHub issue for this problem?

Glenn Buckholtz

unread,
Jan 15, 2024, 4:13:42 PM1/15/24
to Drools Setup
So a workaround would be to use an earlier version of Java?  Have you tried that?

Glenn Buckholtz

unread,
Jan 16, 2024, 4:11:04 PM1/16/24
to Drools Setup
I tried an earlier Java and not surprisingly,  the error goes away!  Thanks @vsoma.
Reply all
Reply to author
Forward
0 new messages