[jboss-jira] [JBoss JIRA] Commented: (JBRULES-1572) sometimes getting ClassFieldExtractor error
Ming Fang (JIRA)
jira-events at lists.jboss.org
Fri May 2 23:43:18 EDT 2008
[ http://jira.jboss.com/jira/browse/JBRULES-1572?page=comments#action_12411687 ]
Ming Fang commented on JBRULES-1572:
------------------------------------
Looking at the code some more.
You're correct that the inserts are protected via the lock, but the fireAllRules() does not check that lock.
Therefore it is possible for a thread to call fireAllRules() and another to be calling insert(), both end up modifying the same BinaryHeapQueue at the same time.
My workaround for this problem is to make the mutating methods of BinaryHeapQueue synchronized. I have not had the problem since doing so.
This problem nearly cost me my job so if you push this to 5.x then I'll have no choice but to use my private build with this fix in it.
> sometimes getting ClassFieldExtractor error
> -------------------------------------------
>
> Key: JBRULES-1572
> URL: http://jira.jboss.com/jira/browse/JBRULES-1572
> Project: JBoss Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Affects Versions: 5.0.0-M1, 4.0.4, 4.0.7
> Reporter: Ming Fang
> Assigned To: Mark Proctor
> Fix For: 5.0.0-M1
>
> Attachments: Foo.java, rule.drl, Test.java, Test.java
>
>
> Caused by: java.lang.NullPointerException
> at org.drools.base.com.ml.ax.ModelValue10285014$getModelValue.getDoubleValue(Unknown Source)
> at org.drools.base.ClassFieldExtractor.getDoubleValue(ClassFieldExtractor.java:191)
> at org.drools.rule.Declaration.getDoubleValue(Declaration.java:281)
> at com.ml.ax.drools.Rule_Quote_0ConsequenceInvoker.evaluate(Rule_Quote_0ConsequenceInvoker.java:17)
> at org.drools.common.DefaultAgenda.fireActivation(DefaultAgenda.java:586)
> This only happens sometimes but it completely breaks my program.
--
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