sharad-zee opened a new issue, #2293:
URL: https://github.com/apache/incubator-kie-issues/issues/2293

   ## 🐛 Bug: Drools 10.2.0 fails to compile minimal rule on Java 25
   
   ### Description
   Drools **10.2.0** fails to compile even minimal rules when running on **Java 
25**.  
   The compiler throws an `UnsupportedOperationException` in 
`DummyConstraintBuilder.setExprInputs`.
   
   Downgrading to **Drools 10.1.0** resolves the issue, indicating a regression 
in 10.2.0.
   
   ---
   
   ### Expected Behavior
   A minimal DRL rule should compile successfully using `KieBuilder.buildAll()`.
   
   ---
   
   ### Actual Behavior
   Compilation fails with an `UnsupportedOperationException`.
   
   ---
   
   ### Environment
   - **Drools Version:** 10.2.0 (Regression from 10.1.0)  
   - **Java Version:** 25  
   - **OS:** macOS (Darwin)  
   
   ---
   
   ### Steps to Reproduce
   
   1. Create a minimal DRL file:
   
   ```drl
   package rules
   
   rule "Minimal Rule"
   when
       String()
   then
   end
   ```
   
   
   Compile using the following Java code:
   ```java
   KieServices kieServices = KieServices.Factory.get();
   KieFileSystem kieFileSystem = kieServices.newKieFileSystem();
   
   kieFileSystem.write("src/main/resources/rules/test.drl", drlContent);
   
   KieBuilder kieBuilder = kieServices.newKieBuilder(kieFileSystem);
   kieBuilder.buildAll(); // Crashes here
   ```
   
   Stack Trace
   ```
   java.lang.UnsupportedOperationException
       at 
org.drools.compiler.rule.builder.ConstraintBuilder$DummyConstraintBuilder.setExprInputs(ConstraintBuilder.java:210)
       at 
org.drools.compiler.rule.builder.PatternBuilder.getExprBindings(PatternBuilder.java:1123)
       at 
org.drools.compiler.rule.builder.PatternBuilder.buildRelationalExpression(PatternBuilder.java:1108)
       at 
org.drools.compiler.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:986)
       ...
   ```
   
   
   ### Additional Context
   Issue does not occur on Drools 10.1.0
   Appears to be a regression introduced in 10.2.0
   Reproducible with a minimal rule (no constraints)
   Possible Root Cause (Speculative)
   
   The failure occurs in DummyConstraintBuilder.setExprInputs, which may 
indicate an incompatibility with Java 25 or a regression in constraint handling 
logic.
   
   ### Workaround
   
   Downgrade to Drools 10.1.0, where the issue does not occur.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to