[
https://issues.jboss.org/browse/DROOLS-1223?page=com.atlassian.jira.plugi...
]
Mario Fusco commented on DROOLS-1223:
-------------------------------------
It seems that you're evaluating a constraint with a null value. Probably the first
round sets that value to null and during the second one the evaluation of a constraint
trying to dereference that value throws the NPE? If my guess is correct this is the normal
behaviour since Drools doesn't catch/manage exceptions thrown during user's
constraint evaluation, mainly for performance reason. However it's impossible for me
to figure out what's going on there without a reproducer of your problem. Can you
please attach one to this ticket or send a pull request to drools project?
java.lang.NullPointerException druing Condition Evaluation
----------------------------------------------------------
Key: DROOLS-1223
URL:
https://issues.jboss.org/browse/DROOLS-1223
Project: Drools
Issue Type: Bug
Affects Versions: 6.3.0.Final, 6.4.0.Final
Reporter: Rodrigo Doria Medina
Assignee: Mario Fusco
{panel:title=Code}
Caused by: java.lang.NullPointerException
at ConditionEvaluator2afa7f52e3ae42c98bf357b4d12bd2f2.evaluate(Unknown Source)
at
org.drools.core.rule.constraint.MvelConstraint.evaluate(MvelConstraint.java:258)
at
org.drools.core.rule.constraint.MvelConstraint.isAllowed(MvelConstraint.java:214)
at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:146)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:504)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:434)
at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:147)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:504)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:434)
at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:147)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:504)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:434)
at org.drools.core.reteoo.AlphaNode.modifyObject(AlphaNode.java:147)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.doPropagateModifyObject(CompositeObjectSinkAdapter.java:504)
at
org.drools.core.reteoo.CompositeObjectSinkAdapter.propagateModifyObject(CompositeObjectSinkAdapter.java:434)
at org.drools.core.reteoo.ObjectTypeNode.modifyObject(ObjectTypeNode.java:359)
at
org.drools.core.reteoo.EntryPointNode.propagateModify(EntryPointNode.java:249)
at
org.drools.core.phreak.PropagationEntry$Update.execute(PropagationEntry.java:150)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:78)
at
org.drools.core.phreak.SynchronizedPropagationList.flush(SynchronizedPropagationList.java:68)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.flushPropagations(StatefulKnowledgeSessionImpl.java:2011)
at org.drools.core.phreak.RuleExecutor.fire(RuleExecutor.java:128)
at
org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:74)
at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:1007)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1350)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1288)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1306)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1297)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1278)
{panel}
This happens when running more than once the same piece of data. (It happens from the
second time).
I have no clue what could that be. When running the first time everything computes as
expected.
Thanks!
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)