Toshiya Kobayashi created DROOLS-2495:
-----------------------------------------
Summary: NullPointerException in Declaration.getHashCode() when getter in LHS
and serialize/deserialize package
Key: DROOLS-2495
URL:
https://issues.jboss.org/browse/DROOLS-2495
Project: Drools
Issue Type: Bug
Components: core engine
Affects Versions: 7.7.0.Final
Reporter: Toshiya Kobayashi
Assignee: Mario Fusco
Under the condition:
- A rule uses a getter method in LHS. e.g. "Cheese(type == $p.getName())"
- A package is serialized/deserialized
executing the rule throws NullPointerException.
{noformat}
java.lang.NullPointerException: null
at org.drools.core.rule.Declaration.getHashCode(Declaration.java:267)
at
org.drools.core.util.AbstractHashTable$FieldIndex.hashCodeOf(AbstractHashTable.java:333)
at
org.drools.core.util.AbstractHashTable$SingleIndex.hashCodeOf(AbstractHashTable.java:397)
at
org.drools.core.util.index.TupleIndexHashTable.getOrCreate(TupleIndexHashTable.java:392)
at org.drools.core.util.index.TupleIndexHashTable.add(TupleIndexHashTable.java:358)
at org.drools.core.phreak.PhreakJoinNode.doLeftInserts(PhreakJoinNode.java:95)
at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:71)
at
org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:552)
at
org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:538)
at org.drools.core.phreak.RuleNetworkEvaluator.evalNode(RuleNetworkEvaluator.java:373)
at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:333)
at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:169)
at
org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:127)
at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:212)
at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:87)
at
org.drools.core.concurrent.AbstractRuleEvaluator.internalEvaluateAndFire(AbstractRuleEvaluator.java:34)
at
org.drools.core.concurrent.SequentialRuleEvaluator.evaluateAndFire(SequentialRuleEvaluator.java:43)
at org.drools.core.common.DefaultAgenda.fireLoop(DefaultAgenda.java:1067)
at org.drools.core.common.DefaultAgenda.internalFireAllRules(DefaultAgenda.java:1014)
at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1006)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.internalFireAllRules(StatefulKnowledgeSessionImpl.java:1315)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1306)
at
org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:1290)
at
org.drools.compiler.integrationtests.SerializedPackageMergeTest.testBuildAndSerializePackagesWithGetterInLHS(SerializedPackageMergeTest.java:220)
{noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)