[rules-users] eval rule in RuleAgent

Edson Tirelli tirelli at post.com
Wed Aug 6 20:51:09 EDT 2008


   Yes it is. May I ask you please to open a JIRA? it is a really simple
mistake, in case you want to fix it locally and provide a patch while we
don't release a new version. It is a wrong cast here:

at org.drools.reteoo.
>
> EvalConditionNode.doRemove(EvalConditionNode.java:265)


   Probably the result of a mistake in a refactory.


   []s
   Edson

2008/8/6 niall <niall.oriordan at macquarie.com>

> Hi,
>
>
> I have the following drl file.
>
>
> ==================================
>
> package bugTestingFail
>
> rule "Price hits Target"
> when
> eval ( true )
> then
> end
>
> ==================================
>
>
> It is managed by a RuleAgent.
>
>
> However, when I change the drl file from the source, I get the following
> except
> ion:
>
>
> RuleAgent(MARKET_DATA) INFO (Wed Aug 06 15:43:53 EST 2008): Applying
> changes to
> the rulebase.
> RuleAgent(MARKET_DATA) EXCEPTION (Wed Aug 06 15:43:53 EST 2008):
> org.drools.reteoo.EvalConditionNode$EvalMemory cannot be cast to
> org.drools.reteoo.BetaMemory. Stack trace should follow.
> java.lang.ClassCastException:
> org.drools.reteoo.EvalConditionNode$EvalMemory
> cannot be cast to org.drools.reteoo.BetaMemory
> at org.drools.reteoo.EvalConditionNode.doRemove(EvalConditionNode.java:265)
> at org.drools.common.BaseNode.remove(BaseNode.java:87)
> at org.drools.reteoo.RuleTerminalNode.doRemove(RuleTerminalNode.java:505)
> at org.drools.common.BaseNode.remove(BaseNode.java:87)
> at org.drools.reteoo.ReteooBuilder.removeRule(ReteooBuilder.java:242)
> at org.drools.reteoo.ReteooRuleBase.removeRule(ReteooRuleBase.java:366)
> at org.drools.common.AbstractRuleBase.removeRule(AbstractRuleBase.java:705)
> at
> org.drools.common.AbstractRuleBase.removePackage(AbstractRuleBase.java:622)
> at org.drools.agent.PackageProvider.removePackage(PackageProvider.java:45)
> at org.drools.agent.PackageProvider.applyChanges(PackageProvider.java:63)
> at org.drools.agent.RuleAgent.refreshRuleBase(RuleAgent.java:320)
> at org.drools.agent.RuleAgent$2.run(RuleAgent.java:438)
> at java.util.TimerThread.mainLoop(Timer.java:512)
> at java.util.TimerThread.run(Timer.java:462)
>
> This only happens to me when I am editing rules files that have an eval
> condition.
>
> Is this a bug?
> Cheers,
> Niall
>
>
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



-- 
Edson Tirelli
JBoss Drools Core Development
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080806/8cb864ea/attachment.html 


More information about the rules-users mailing list