-
Bug
-
Resolution: Done
-
Major
-
1.33.0.Final
-
None
-
3
-
False
-
None
-
False
-
---
-
---
-
2023 Week 06-08 (from Feb 6)
-
Important
We are deploying our Spring Boot Rules Engine service inside of a container in a JAR file.
When we execute
RuleUnitProvider.get().createRuleUnitInstance(appointmentAccessUnit);
we get the following error:
java.lang.RuntimeException: Cannot find any rule unit for RuleUnitData of class:....AppointmentAccessUnit
After debugging the code I found that the error occurs in RuleUnitProviderImpl::ruleResourcesForUnitClass (line 113 in 8.33.0.Final)
The line
Optional.ofNullable(new File(path).listFiles())
looks for the DRL files in `file:/opt/dir/service/lib/rules-engine-1.0.0.jar!/com/site/dir/dir/v1/service/rules` which always comes up empty since the `listFiles` method doesn't really work with JAR files.
- is related to
-
DROOLS-7388 Fails to find RuleUnit drl in spring boot executable jar
- Resolved