[rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator

Davide Sottara dsotty at gmail.com
Mon Nov 18 09:48:27 EST 2013


I tried to reproduce the problem, with no success.
Could you please create a self-contained unit test?
If confirmed, I'll fix the problem as soon as possible
Thanks
Davide

On 11/14/2013 04:48 AM, abr wrote:
> Hi everyone,
>
> I tried to switch from 5.5.0.Final to 5.6.0.CR1 and got a null pointer
> exception in the evaluation of the after evaluator.
> (Exact method is:
> /org.drools.base.evaluators.AfterEvaluatorDefinition.AfterEvaluator.evaluate(InternalWorkingMemory,
> InternalReadAccessor, InternalFactHandle, InternalReadAccessor,
> InternalFactHandle)/ )
>
> When debugging, the exception occurs at the very first line of the method,
> in:
> /    if ( extractor1.isNullValue( workingMemory, handle1.getObject() ) || 
>             extractor2.isNullValue( workingMemory, handle2.getObject() ) ) {
>         return false;
>     }
> /
> The cause of the exception is that handle1 is null.
>
> The rule where the exception occurs looks like:
> /    MyFact(
>         fromdate before[ 0d ] $min,
>         ( todate == null || todate after[ 0d ] $max ) )
> /
>
> When the exception occurs, /MyFact.fromdate/ is not null, /$min/ is not
> null, /MyFact.todate/ is null, /$max/ is not null.
> In AfterEvaluator.evaluate : /extractor1/ refers to /MyFact.todate/,
> /extractor2/ refers to /$max/, /handle1/ is null, /handle2/ refers to the
> fact including the attribute to which /$max/ variable is bound to.
>
> Of course, this worked fine in 5.5.0.Final.
> I couldn't test this out in Drools 6.0.0.CR5 because I have dependencies to
> drools-spring JAR that does not exist anymore in 6.0.0.CR5.
>
> Is it simple to fix this problem?
>
> Thanks in advance.
>
> Best,
> Alexis
>
>
>
> --
> View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780.html
> Sent from the Drools: User forum mailing list archive at Nabble.com.
> _______________________________________________
> rules-users mailing list
> rules-users at lists.jboss.org
> https://lists.jboss.org/mailman/listinfo/rules-users
>



More information about the rules-users mailing list