Hide Forgot
Help Desk Ticket Reference: https://access.redhat.com/issue-tracker/?module=issues&action=view&tid=1128553&gid=1354 Workaround Description: Do not use "<=" and ">=" operators in your rule patterns, but use "<" and ">" securitylevel_name: Public When you have a rule pattern like for example: $container : Container( bigIntegerValue >= "5", bigIntegerValue <= "21") Where Container fact has a field called bigIntegerValue of type BigInteger test scenarios fail with: ServiceImplementation.java:loadRuleBase:1885) java.io.InvalidClassException: org.drools.base.evaluators.ComparableEvaluatorsDefinition$BigIntegerLessOrEqualEvaluator; org.drools.base.evaluators.ComparableEvaluatorsDefinition$BigIntegerLessOrEqualEvaluator; no valid constructor I assume this would happen for all fact types that have no default constructor. The "<" and ">" operators work fine for some reason.
Link: Added: This issue depends GUVNOR-569
It's not the fact types that are the problem here, the problem is that org.drools.base.evaluators.ComparableEvaluatorsDefinition$BigIntegerLessOrEqualEvaluator has a private constructor. So far we've only experienced this problem with org.drools.base.evaluators.ComparableEvaluatorsDefinition$BigIntegerLessOrEqualEvaluator and not org.drools.base.evaluators.ComparableEvaluatorsDefinition$BigIntegerGreaterOrEqualEvaluator
Yes, the evaluator constructors: public BigIntegerLessEvaluator() {...} private BigIntegerLessOrEqualEvaluator() { ... } public BigIntegerGreaterEvaluator() {...} public BigIntegerGreaterOrEqualEvaluator() {...} so the quick fix would be to change the BigIntegerLessOrEqualEvaluator() to public. The correct fix would be to implement externalizable on the classes which deserializes the evaluators so that we can always use the same instance. I will open a separate JIRA for that task.
Changed the BigIntegerLessOrEqualEvaluator constructor to public from private.
Writer: Added: Darrin
Release Notes Docs Status: Added: Not Yet Documented
Release Notes Text: Added: test
Release Notes Text: Removed: test
Labels: Removed: rn-dmison rn-open Added: rn-dlesage rn-done-resolved
Release Notes Docs Status: Removed: Not Yet Documented Added: Documented as Resolved Issue Writer: Removed: Darrin Added: dlesage Release Notes Text: Added: https://jira.jboss.org/browse/GUVNOR-569 Users could not utilise the "<=" operator in rule patterns as this would cause an exception. This was because the BigIntegerLessOrEqualEvaluator constructor was set to private. It has now been made public, meaning users can utilise that operator.