user27989825
user27989825

Reputation: 1

Drools 9 Spring 3 using RuleUnit unable to load rules from file system

I am trying to upgrade Drools to version 9.44 from 7. My application is running on SpringBoot 3. I implemented RuleUnit and migrated all the rules to the new format. According to the specs the DRL files should be located at the directory matching RuleUnit package name. I migrated all the rules to the resources folder with the recommended directory structure. When I run my local SpringBoot unit test everything works, the rules are loaded properly. But when I deploy and run my application on the cluster, I see this error message:

java.lang.StringIndexOutOfBoundsException: begin 5, end 3, length 97\\n\\tat java.base/java.lang.String.checkBoundsBeginEnd(String.java:4606)\\n\\tat java.base/java.lang.String.substring(String.java:2709)\\n\\tat org.drools.ruleunits.impl.RuleUnitProviderImpl.collectResourcesInJar(RuleUnitProviderImpl.java:189)

This tells me that KIE container is trying to load the rules from JAR instead of file system.

I am not sure how to change it so the rules are loaded from the specific folder in the file system. Please help.

Upvotes: 0

Views: 91

Answers (0)

Related Questions