[rules-users] NullPointerException when updating a fact

Wolfgang Laun wolfgang.laun at gmail.com
Mon Jul 29 09:10:55 EDT 2013


I have several excellent reasons to doubt that what you have posted is
exactly what you are executing. Please post code that you have
verified to reproduce the issue.

-W


On 29/07/2013, schenka7 <eugen.berenstein at gmail.com> wrote:
> Hi dear drools team,
> I've got a strange problem and hope someone can help me. I'm using drools
> 5.5.0.
>
> I have some rules to validate user input. These will set the valid flag on
> a
> fact to false and insert a Message fact into working memory that will
> contain a message and a reference to the causing fact.
>
>
>
> I also have a rule to retract Messages for facts which are not invalid
> anymore.
>
>
>
> I observe a NullPointerException originating at
> DefaultAgenda.createActivation() when I perform following steps:
> Insert a valid FirstName and call session.fireAllRules().
> Change the FirstName to become invalid, call session.update() on it and
> call
> session.fireAllRules().
>
> The rule for retracting messages is the cause for the problem.
> My question is, how can I fix it? Or is there a better way to manage error
> messages?
>
> Thank you
>
>
>
> --
> View this message in context:
> http://drools.46999.n3.nabble.com/NullPointerException-when-updating-a-fact-tp4025181.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