I'll try to reproduce the exception with the rule and the data model.
Meanwhile, could you share a self-contained unit test that reproduces
the problem?
That would speed up the fix process
Thanks!
Davide
On 07/07/2014 04:24 PM, Borris wrote:
On Monday 07/07/2014 23:09, Borris wrote:
> Hi,
>
> Thanks for the response.
>
> Version is now 6.1.0.201407061813 (snapshot from last night). Previous
> version was 6.1.0.201406070605 (snapshot from about a month ago). I was
> on a snapshot because I wanted the fix for this:
>
https://github.com/droolsjbpm/droolsjbpm-tools/commit/6bc54748e
Slight "my bad" - I'd forgoten to do a new runtime and use that. Fixed.
Still get the same issue, but some of the line numbers are slightly
different, in case that's relevant.
Exception in thread "main" java.lang.ClassCastException:
com.tastiereasier.rulez.ContextFoodItem cannot be cast to
com.tastiereasier.domain.FoodItem
at
ConditionEvaluator3754d879fb5b46a3b2cfbe61326ba9f5.evaluate(Unknown Source)
at
org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:216)
at
org.drools.core.rule.constraint.MvelConstraint.isAllowedCachedLeft(MvelConstraint.java:185)
at
org.drools.core.common.SingleNonIndexSkipBetaConstraints.isAllowedCachedLeft(SingleNonIndexSkipBetaConstraints.java:141)
at
org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:98)
at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:60)
at
org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:547)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:533)
at
org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalStackEntry(RuleNetworkEvaluator.java:224)
at
org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:166)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at
org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:216)
at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:91)
at
org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:964)
at
org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1234)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1239)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1212)
at com.tastiereasier.rulez.Rulez.insertAndFire(Rulez.java:168)
at com.tastiereasier.rulez.Rulez.addDinerToContext(Rulez.java:310)
at com.tastiereasier.rulez.Rulez.<init>(Rulez.java:101)
at com.tastiereasier.rulez.Rulez.main(Rulez.java:44)
_______________________________________________
rules-users mailing list
rules-users(a)lists.jboss.org
https://lists.jboss.org/mailman/listinfo/rules-users