[jboss-jira] [JBoss JIRA] Updated: (JBRULES-2419) Using an undefinied accumulate function should give a clear error warning instead of a NullPointerException

Mark Proctor (JIRA) jira-events at lists.jboss.org
Sat Apr 3 22:52:37 EDT 2010


     [ https://jira.jboss.org/jira/browse/JBRULES-2419?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mark Proctor updated JBRULES-2419:
----------------------------------

    Fix Version/s: 5.1.0.M2


> Using an undefinied accumulate function should give a clear error warning instead of a NullPointerException
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: JBRULES-2419
>                 URL: https://jira.jboss.org/jira/browse/JBRULES-2419
>             Project: Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: drools-compiler (expert)
>    Affects Versions: 5.0.1.FINAL
>            Reporter: Geoffrey De Smet
>            Assignee: Edson Tirelli
>            Priority: Minor
>             Fix For: 5.1.0.M2
>
>
> Reproduced on with Micheals project with Drools 5.0.1
> I got this error:
> {code}
> Exception caught while executing action: org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction at 1a5e68a
> java.lang.NullPointerException
> 	at org.drools.base.accumulators.JavaAccumulatorFunctionExecutor.createContext(JavaAccumulatorFunctionExecutor.java:82)
> 	at org.drools.rule.Accumulate.createContext(Accumulate.java:122)
> {code}
> when I wrote this rule for him:
> {code}
> rule "rewardLowestNonFree"
>     when
>         $lowestAppsSize : Number() from accumulate(
>             AppServerInstance(apps.size != 0, $appsSize : apps.size),
>             lowest($appsSize) // Vote for http://jira.jboss.com/jira/browse/JBRULES-1075
>         );
>     then
>         insertLogical(new IntConstraintOccurrence("rewardLowestNonFree", ConstraintType.POSITIVE, - $lowestAppsSize.intValue()));
> end
> {code}
> Turns out the "lowest" function doesn't exist. (I should have used "min" btw)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list