[jboss-jira] [JBoss JIRA] (DROOLS-486) Multiple ClassCastException-s when executing rules
Sergey Alaev (JIRA)
issues at jboss.org
Fri May 23 09:03:58 EDT 2014
[ https://issues.jboss.org/browse/DROOLS-486?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12970085#comment-12970085 ]
Sergey Alaev commented on DROOLS-486:
-------------------------------------
I cant - minimum reproducer i've made so far requires 14 rule invocations and throws exception only in one run out of ten.
Also it throws only when run from Eclipse and not from Maven :)
What can i do to investigate it myself?
> Multiple ClassCastException-s when executing rules
> --------------------------------------------------
>
> Key: DROOLS-486
> URL: https://issues.jboss.org/browse/DROOLS-486
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 6.0.1.Final
> Environment: JDK6, single-threaded execution
> Reporter: Sergey Alaev
> Assignee: Mario Fusco
>
> 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.2.3#6260)
More information about the jboss-jira
mailing list