[
https://issues.jboss.org/browse/DROOLS-486?page=com.atlassian.jira.plugin...
]
Mario Fusco resolved DROOLS-486.
--------------------------------
Fix Version/s: 6.2.0.Beta2
Resolution: Done
That problem was caused by constraints jitting and has been already fixed
Multiple ClassCastException-s when executing rules
--------------------------------------------------
Key: DROOLS-486
URL:
https://issues.jboss.org/browse/DROOLS-486
Project: Drools
Issue Type: Bug
Affects Versions: 6.0.1.Final
Environment: JDK6, single-threaded execution
Reporter: Sergey Alaev
Assignee: Mario Fusco
Fix For: 6.2.0.Beta2
When trying to migrate to Drools 6.0.1 (everything was fine with 6.0.0) we get multiple
ClassCastException.
Assume we have hierarchy where B and C are children of A and we have following rules:
when:
B(....)
then:
...
when:
C(...)
then:
...
Then following exceptions are observed on every execute with instance of B() in context:
java.lang.ClassCastException: B cannot be cast to C
at org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:217)
at org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:174)
at
org.drools.core.phreak.PhreakFromNode.checkConstraintsAndPropagate(PhreakFromNode.java:298)
at org.drools.core.phreak.PhreakFromNode.doLeftInserts(PhreakFromNode.java:101)
at org.drools.core.phreak.PhreakFromNode.doNode(PhreakFromNode.java:49)
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:348)
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:200)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:957)
at
org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:941)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:264)
Again, everything works OK in Drools 6.0.0.
--
This message was sent by Atlassian JIRA
(v6.3.1#6329)