You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@kie.apache.org by Doug Whitfield <dw...@perforce.com.INVALID> on 2025/10/27 19:36:53 UTC
Does 10.1 work with Java 21?
I recognise the docs say “17+” but I wonder if Java 21 is part of the test suite.
Drools 10.1.0 rule compilation fails on Java 21 (OpenJDK) with an UnsupportedOperationException during parallel rule compilation when creating a KieSession from a KJAR.
Environment
Java: OpenJDK 21
Drools: 10.1.0
OS: Windows
Maven: 3.x
Steps to Reproduce
1. Build a KJAR with Drools 10.1.0
2. Load via KieServices.Factory.get().getKieClasspathContainer() and create a KieSession from a KJAR
3. Trigger parallel rule compilation
Error Details
java.lang.RuntimeException: Rules compilation failed or interrupted at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.compileRulesLevel(ImmutableRuleCompilationPhase.java:285)
... (parallel execution stack trace using atomic primitives)
Root cause:
java.lang.UnsupportedOperationException: null
at org.drools.compiler.rule.builder.ConstraintBuilder$DummyConstraintBuilder.setExprInputs(ConstraintBuilder.java:210)
Stack Trace Highlights
The failure occurs in parallel execution via ForkJoinPool:
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel
at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.lambda$compileRulesLevel$4
Indicates a failure during parallel compilation using Java 21's stream framework.
Workarounds Attempted (None Successful)
1. System.setProperty("drools.parallelExecutionAllowed", "false") – not honored in 10.x
2. System.setProperty("drools.multithreadEvaluation", "false") – no effect
3. Downgrade to Drools 8.44 – DRL incompatibility with 10.x-compiled rules
4. -Djdk.reflect.useDirectMethodHandle=false – still fails with native reflection
Expected Behavior
Rules compile and execute successfully on Java 21 without errors.
[Perforce Software]
Douglas Whitfield | Enterprise Architect, OpenLogic
Perforce Software<https://www.perforce.com>
P +1 612.517.2100
Visit Us On: LinkedIn<https://www.linkedin.com/company/perforce> | YouTube<https://www.youtube.com/user/perforcesoftware>
This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
Re: Does 10.1 work with Java 21?
Posted by Doug Whitfield <dw...@perforce.com.INVALID>.
Thank you!
From: Jason Porter <jp...@ibm.com.INVALID>
Date: Monday, 27 October 2025 at 15:09
To: users@kie.apache.org <us...@kie.apache.org>
Subject: Re: Does 10.1 work with Java 21?
You don't often get email from jporter@ibm.com.invalid. Learn why this is important<https://aka.ms/LearnAboutSenderIdentification>
Support on 21 is one of the things we're working on for 10.2.0.
--
Jason Porter
Software Engineer
He/Him/His
IBM
From: Doug Whitfield <dw...@perforce.com.INVALID>
Date: Monday, October 27, 2025 at 13:37
To: users@kie.apache.org <us...@kie.apache.org>
Subject: [EXTERNAL] Does 10.1 work with Java 21?
This Message Is From an External Sender
This message came from outside your organization.
Report Suspicious<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/AdhS1Rd-!-_FVHVY-Xk87-ls5TmWg8VGmuqlnuI5mIYv4P5-Yk-hehmIjYHIp0A3v4-NmAh3Fk9F0mgvuheTbIjDtNcLAq36ZTCH2U0UZR0dFqkNdnKSf81KIC_SMrB4sMRiejgD31E8BqItx$>
I recognise the docs say “17+” but I wonder if Java 21 is part of the test suite.
Drools 10.1.0 rule compilation fails on Java 21 (OpenJDK) with an UnsupportedOperationException during parallel rule compilation when creating a KieSession from a KJAR.
Environment
Java: OpenJDK 21
Drools: 10.1.0
OS: Windows
Maven: 3.x
Steps to Reproduce
1. Build a KJAR with Drools 10.1.0
2. Load via KieServices.Factory.get().getKieClasspathContainer() and create a KieSession from a KJAR
3. Trigger parallel rule compilation
Error Details
java.lang.RuntimeException: Rules compilation failed or interrupted at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.compileRulesLevel(ImmutableRuleCompilationPhase.java:285)
... (parallel execution stack trace using atomic primitives)
Root cause:
java.lang.UnsupportedOperationException: null
at org.drools.compiler.rule.builder.ConstraintBuilder$DummyConstraintBuilder.setExprInputs(ConstraintBuilder.java:210)
Stack Trace Highlights
The failure occurs in parallel execution via ForkJoinPool:
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel
at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.lambda$compileRulesLevel$4
Indicates a failure during parallel compilation using Java 21's stream framework.
Workarounds Attempted (None Successful)
1. System.setProperty("drools.parallelExecutionAllowed", "false") – not honored in 10.x
2. System.setProperty("drools.multithreadEvaluation", "false") – no effect
3. Downgrade to Drools 8.44 – DRL incompatibility with 10.x-compiled rules
4. -Djdk.reflect.useDirectMethodHandle=false – still fails with native reflection
Expected Behavior
Rules compile and execute successfully on Java 21 without errors.
[Perforce Software]
Douglas Whitfield | Enterprise Architect, OpenLogic
Perforce Software<https://www.perforce.com>
P +1 612.517.2100
Visit Us On: LinkedIn<https://www.linkedin.com/company/perforce> | YouTube<https://www.youtube.com/user/perforcesoftware>
This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
CAUTION: This email originated from outside of the organization. Do not click on links or open attachments unless you recognize the sender and know the content is safe.
This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.
Re: Does 10.1 work with Java 21?
Posted by Jason Porter <jp...@ibm.com.INVALID>.
Support on 21 is one of the things we're working on for 10.2.0.
--
Jason Porter
Software Engineer
He/Him/His
IBM
From: Doug Whitfield <dw...@perforce.com.INVALID>
Date: Monday, October 27, 2025 at 13:37
To: users@kie.apache.org <us...@kie.apache.org>
Subject: [EXTERNAL] Does 10.1 work with Java 21?
This Message Is From an External Sender
This message came from outside your organization.
Report Suspicious<https://us-phishalarm-ewt.proofpoint.com/EWT/v1/AdhS1Rd-!-_FVHVY-Xk87-ls5TmWg8VGmuqlnuI5mIYv4P5-Yk-hehmIjYHIp0A3v4-NmAh3Fk9F0mgvuheTbIjDtNcLAq36ZTCH2U0UZR0dFqkNdnKSf81KIC_SMrB4sMRiejgD31E8BqItx$>
I recognise the docs say “17+” but I wonder if Java 21 is part of the test suite.
Drools 10.1.0 rule compilation fails on Java 21 (OpenJDK) with an UnsupportedOperationException during parallel rule compilation when creating a KieSession from a KJAR.
Environment
Java: OpenJDK 21
Drools: 10.1.0
OS: Windows
Maven: 3.x
Steps to Reproduce
1. Build a KJAR with Drools 10.1.0
2. Load via KieServices.Factory.get().getKieClasspathContainer() and create a KieSession from a KJAR
3. Trigger parallel rule compilation
Error Details
java.lang.RuntimeException: Rules compilation failed or interrupted at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.compileRulesLevel(ImmutableRuleCompilationPhase.java:285)
... (parallel execution stack trace using atomic primitives)
Root cause:
java.lang.UnsupportedOperationException: null
at org.drools.compiler.rule.builder.ConstraintBuilder$DummyConstraintBuilder.setExprInputs(ConstraintBuilder.java:210)
Stack Trace Highlights
The failure occurs in parallel execution via ForkJoinPool:
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateParallel
at org.drools.compiler.builder.impl.processors.ImmutableRuleCompilationPhase.lambda$compileRulesLevel$4
Indicates a failure during parallel compilation using Java 21's stream framework.
Workarounds Attempted (None Successful)
1. System.setProperty("drools.parallelExecutionAllowed", "false") – not honored in 10.x
2. System.setProperty("drools.multithreadEvaluation", "false") – no effect
3. Downgrade to Drools 8.44 – DRL incompatibility with 10.x-compiled rules
4. -Djdk.reflect.useDirectMethodHandle=false – still fails with native reflection
Expected Behavior
Rules compile and execute successfully on Java 21 without errors.
[Perforce Software]
Douglas Whitfield | Enterprise Architect, OpenLogic
Perforce Software<https://www.perforce.com >
P +1 612.517.2100
Visit Us On: LinkedIn<https://www.linkedin.com/company/perforce > | YouTube<https://www.youtube.com/user/perforcesoftware >
This e-mail may contain information that is privileged or confidential. If you are not the intended recipient, please delete the e-mail and any attachments and notify us immediately.