[jboss-jira] [JBoss JIRA] Created: (JBRULES-1142) nested accessors on the lhs of the memberOf (or not memberOf) operator lead to an exception
andreas kinell (JIRA)
jira-events at lists.jboss.org
Tue Aug 28 08:02:35 EDT 2007
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
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 at 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
More information about the jboss-jira
mailing list