[
http://jira.jboss.com/jira/browse/JBRULES-1142?page=comments#action_12374159 ]
andreas kinell commented on JBRULES-1142:
-----------------------------------------
After chatting with E.Tirelli it seems that this bug was fixed by a bugfix for a very
similar issue.
see this thread regarding 'contains':
http://lists.jboss.org/pipermail/rules-users/2007-August/002356.html
nested accessors on the lhs of the memberOf (or not memberOf)
operator lead to an exception
-------------------------------------------------------------------------------------------
Key: JBRULES-1142
URL:
http://jira.jboss.com/jira/browse/JBRULES-1142
Project: JBoss Rules
Issue Type: Bug
Security Level: Public(Everyone can see)
Affects Versions: 4.0.0.GA
Environment: Windows XP, Java 1.5, Drools 4.0.0.GA
Reporter: andreas kinell
Assigned To: Mark Proctor
Original Estimate: 5 hours
Remaining Estimate: 5 hours
nested accessors on the lhs of the memberOf (or not memberOf) operator lead to an
exception:
business logic (pseudocode):
class Position {
private Instrument instrument;
}
class Instrument {
private Currency currency;
}
with getters and setters.
rule:
$collection : Collection()
$position : Position(instrument.currency not memberOf $collection)
exception:
org.drools.RuntimeDroolsException: Exception executing predicate
org.drools.base.mvel.MVELPredicateExpression@1f99eea
at
org.drools.rule.PredicateConstraint.isAllowedCachedLeft(PredicateConstraint.java:212)
at
org.drools.common.SingleBetaConstraints.isAllowedCachedLeft(SingleBetaConstraints.java:110)
at org.drools.reteoo.JoinNode.assertTuple(JoinNode.java:119)
at
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
at org.drools.reteoo.JoinNode.assertObject(JoinNode.java:162)
at
org.drools.reteoo.CompositeObjectSinkAdapter.propagateAssertObject(CompositeObjectSinkAdapter.java:317)
at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:168)
at org.drools.reteoo.Rete.assertObject(Rete.java:168)
at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:190)
at org.drools.reteoo.ReteooWorkingMemory.doInsert(ReteooWorkingMemory.java:70)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:848)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:822)
at org.drools.common.AbstractWorkingMemory.insert(AbstractWorkingMemory.java:623)
at test.RuleTest.testRuleEngine1(RuleTest.java:99)
Caused by: java.lang.ClassCastException: test.Currency
at
org.drools.base.mvel.MVELPredicateExpression.evaluate(MVELPredicateExpression.java:36)
at
org.drools.rule.PredicateConstraint.isAllowedCachedLeft(PredicateConstraint.java:206)
... 33 more
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira