Re: [rules-users] NullPointerException with LeftTupleIndexHashTable.remove()
Hi, This issue has been fixed in version: 6.1.0.Beta1 Nicolas-Xavier Le 10/03/2014 16:34, iqextremer [via Drools] a écrit : I am also suffering the same issue, wonder if there is any resolution on this yet? If you reply to this email, your message will be added to the discussion below: http://drools.46999.n3.nabble.com/NullPointerException-with-LeftTupleIndexHashTable-remove-tp4028133p4028613.html To unsubscribe from NullPointerException with LeftTupleIndexHashTable.remove(), click here http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_codenode=4028133code=bnh2YW5kZXJsaW5kZW5AZ21haWwuY29tfDQwMjgxMzN8LTY5OTE5Nzg5Nw==. NAML http://drools.46999.n3.nabble.com/template/NamlServlet.jtp?macro=macro_viewerid=instant_html%21nabble%3Aemail.namlbase=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespacebreadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-with-LeftTupleIndexHashTable-remove-tp4028133p4028615.html Sent from the Drools: User forum mailing list archive at Nabble.com.___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] NullPointerException with LeftTupleIndexHashTable.remove()
Hello, any news ? Should I create an issue in JIRA ? Nicolas-Xavier nxv wrote Here is another zip (I removed the test in relation with another issue: DROOLS-421). The right method method to execute is testLeftTupleIndexHashTable() Drools-LeftTupleIndexHashTable-61b.zip http://drools.46999.n3.nabble.com/file/n4028138/Drools-LeftTupleIndexHashTable-61b.zip Here is the trace: 2014-02-17 09:04:15,450 [main] INFO Found kmodule: file:/E:/Project/Haulogy/EnergyComm/IDE/workspace-kepler/drools-61-bug/target/classes/META-INF/kmodule.xml 2014-02-17 09:04:15,454 [main] DEBUG KieModule URL type=file url=/Project/Haulogy/EnergyComm/IDE/workspace-kepler/drools-61-bug/target/classes 2014-02-17 09:04:15,521 [main] DEBUG Found and used pom.properties \Project\Haulogy\EnergyComm\IDE\workspace-kepler\drools-61-bug\target\classes\META-INF\maven\org.test2\test\pom.properties 2014-02-17 09:04:15,524 [main] DEBUG Discovered classpath module org.test2:test:0.0.1-SNAPSHOT 2014-02-17 09:04:15,527 [main] INFO KieModule was added:FileKieModule[ ReleaseId=org.test2:test:0.0.1-SNAPSHOTfile=\Project\Haulogy\EnergyComm\IDE\workspace-kepler\drools-61-bug\target\classes] 2014-02-17 09:04:16,618 [main] DEBUG Starting Engine in PHREAK mode 2014-02-17 09:04:16,664 [main] TRACE Adding Rule Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint 2014-02-17 09:04:16,667 [main] TRACE Adding Rule Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,726 [main] TRACE Insert [fact 0:1:1391516304:1391516304:1:DEFAULT:NON_TRAIT:org.after.evaluate.Message@52f0da90] 2014-02-17 09:04:16,733 [main] TRACE LinkNode notify=false nmask=1 smask=1 spos=0 rules= 2014-02-17 09:04:16,734 [main] TRACE LinkSegment smask=2 rmask=2 name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,738 [main] TRACE LinkNode notify=true nmask=1 smask=1 spos=0 rules=[RuleMem Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint], [RuleMem Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo] 2014-02-17 09:04:16,738 [main] TRACE Insert [fact 0:2:528227185:528227185:2:DEFAULT:NON_TRAIT:org.leftTupleIndexHashTable.CommonPayloadData@1f7c1b71] 2014-02-17 09:04:16,739 [main] TRACE BetaNode insert=1 stagedInsertWasEmpty=true 2014-02-17 09:04:16,739 [main] TRACE LinkNode notify=true nmask=2 smask=3 spos=0 rules=[RuleMem Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint], [RuleMem Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo] 2014-02-17 09:04:16,739 [main] TRACE LinkSegment smask=1 rmask=1 name=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint 2014-02-17 09:04:16,739 [main] TRACE LinkSegment smask=1 rmask=3 name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,739 [main] TRACE LinkRule name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,750 [main] TRACE Queue RuleAgendaItem [Activation rule=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo, act#=0, salience=0, tuple=null] 2014-02-17 09:04:16,750 [main] TRACE Queue Added 1 [Activation rule=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo, act#=0, salience=0, tuple=null] 2014-02-17 09:04:16,750 [main] TRACE Rule[name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo] segments=2 TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,750 [main] TRACE 1 [JoinNode(5) - [ClassObjectType class=org.leftTupleIndexHashTable.CommonPayloadData]] TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,750 [main] TRACE Segment 0 2014-02-17 09:04:16,750 [main] TRACE 1 [JoinNode(5) - [ClassObjectType class=org.leftTupleIndexHashTable.CommonPayloadData]] TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,754 [main] TRACE rightTuples TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,755 [main] TRACE Segment 1 2014-02-17 09:04:16,755 [main] TRACE2 [NotNode(9) - [ClassObjectType class=org.after.evaluate.DeliveryPoint]] TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,755 [main] TRACESegment 1 2014-02-17 09:04:16,755 [main] TRACE2 [NotNode(9) - [ClassObjectType class=org.after.evaluate.DeliveryPoint]] TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,755 [main] TRACErightTuples TupleSets[insertSize=0, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,756 [main] TRACE 3 [RuleTerminalNode(10): rule=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo] TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,756 [main] TRACE Segment 1 2014-02-17 09:04:16,756 [main] TRACE 3 [RuleTerminalNode(10): rule=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo] TupleSets[insertSize=1, deleteSize=0, updateSize=0] 2014
Re: [rules-users] NullPointerException with LeftTupleIndexHashTable.remove()
[fact 0:2:528227185:528227185:2:DEFAULT:NON_TRAIT:org.leftTupleIndexHashTable.CommonPayloadData@1f7c1b71] [fact 0:1:1391516304:1391516304:1:DEFAULT:NON_TRAIT:org.after.evaluate.Message@52f0da90] ] ] 2014-02-17 09:04:16,760 [main] TRACE Update [fact 0:2:528227185:528227185:3:DEFAULT:NON_TRAIT:org.leftTupleIndexHashTable.CommonPayloadData@1f7c1b71] 2014-02-17 09:04:16,761 [main] TRACE LinkSegment smask=1 rmask=1 name=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint 2014-02-17 09:04:16,761 [main] TRACE LinkSegment smask=1 rmask=3 name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,761 [main] TRACE LinkRule name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,761 [main] TRACE Insert [fact 0:3:2030712447:2030712447:4:DEFAULT:NON_TRAIT:org.after.evaluate.DeliveryPoint@790a367f] 2014-02-17 09:04:16,761 [main] TRACE BetaNode insert=1 stagedInsertWasEmpty=true 2014-02-17 09:04:16,761 [main] TRACE LinkNode notify=true nmask=1 smask=1 spos=1 rules=[RuleMem Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint] 2014-02-17 09:04:16,761 [main] TRACE LinkSegment smask=2 rmask=3 name=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint 2014-02-17 09:04:16,761 [main] TRACE LinkRule name=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint 2014-02-17 09:04:16,761 [main] TRACE Queue RuleAgendaItem [Activation rule=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint, act#=2, salience=0, tuple=null] 2014-02-17 09:04:16,761 [main] TRACE Queue Added 1 [Activation rule=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint, act#=2, salience=0, tuple=null] 2014-02-17 09:04:16,762 [main] TRACE LinkNode notify=true nmask=1 smask=1 spos=1 rules=[RuleMem Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo] 2014-02-17 09:04:16,762 [main] TRACE LinkSegment smask=2 rmask=3 name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,762 [main] TRACE LinkRule name=Qualification##Supply ToStart##Sply-ToStrt_q-Std_crDPo 2014-02-17 09:04:16,762 [main] TRACE Rule[name=Qualification##Supply ToStart##Fact loader##DeliveryPeriod from DeliveryPoint] segments=2 TupleSets[insertSize=0, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,762 [main] TRACE 4 [JoinNode(5) - [ClassObjectType class=org.leftTupleIndexHashTable.CommonPayloadData]] TupleSets[insertSize=0, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,762 [main] TRACE Segment 0 2014-02-17 09:04:16,762 [main] TRACE 4 [JoinNode(5) - [ClassObjectType class=org.leftTupleIndexHashTable.CommonPayloadData]] TupleSets[insertSize=0, deleteSize=0, updateSize=0] 2014-02-17 09:04:16,762 [main] TRACE rightTuples TupleSets[insertSize=0, deleteSize=0, updateSize=1] 2014-02-17 09:04:16,762 [main] TRACE Segment 1 2014-02-17 09:04:16,762 [main] TRACE5 [JoinNode(7) - [ClassObjectType class=org.after.evaluate.DeliveryPoint]] TupleSets[insertSize=0, deleteSize=0, updateSize=1] 2014-02-17 09:04:16,762 [main] TRACESegment 1 2014-02-17 09:04:16,762 [main] TRACE5 [JoinNode(7) - [ClassObjectType class=org.after.evaluate.DeliveryPoint]] TupleSets[insertSize=0, deleteSize=0, updateSize=1] 2014-02-17 09:04:16,762 [main] TRACErightTuples TupleSets[insertSize=1, deleteSize=0, updateSize=0] Mark Proctor wrote Also as a tip, turn on TRACE mode, for the logback.xml, and post back the results. Mark ?xml version=1.0 encoding=UTF-8? configuration appender name=consoleAppender class=ch.qos.logback.core.ConsoleAppender encoder pattern %d [%t] %-5p %m%n /pattern /encoder /appender logger name=org.drools level=“TRACE/ root level=info appender-ref ref=consoleAppender / /root /configuration On 16 Feb 2014, at 23:55, Mark Proctor lt; mproctor@ gt; wrote: you have two drl files. One with two rules, one with one rule. Which is the rule you were adding and removing to see the bug? Mark On 16 Feb 2014, at 22:50, nxv lt; nxvanderlinden@ gt; wrote: Here is the unit test. Drools-LeftTupleIndexHashTable-61.zip lt;http://drools.46999.n3.nabble.com/file/n4028135/Drools-LeftTupleIndexHashTable-61.zipgt; Mark Proctor wrote Can you paste the 3 rules, that cause the issue? We’ll see if we can gleam something from that, while we wait for your unit test. Mark On 16 Feb 2014, at 19:25, nxv lt; nxvanderlinden@ gt; wrote: Hello, I keep trying to migrate drools from 5.5 to 6 on my project. I found a second regression/issue. I'm trying to produce a unit test for 6.1.0-SNAPSHOT but I face some difficulties to determine the cause of this issue. So I have a drl with 3 rules. I'm a bit disappointed because if I switch two rules (without modifying anything, just switch one rule with another in the drl file), the NPE
[rules-users] NullPointerException with LeftTupleIndexHashTable.remove()
Hello, I keep trying to migrate drools from 5.5 to 6 on my project. I found a second regression/issue. I'm trying to produce a unit test for 6.1.0-SNAPSHOT but I face some difficulties to determine the cause of this issue. So I have a drl with 3 rules. I'm a bit disappointed because if I switch two rules (without modifying anything, just switch one rule with another in the drl file), the NPE disappears... Here is the stacktrace: java.lang.NullPointerException at org.drools.core.util.index.LeftTupleIndexHashTable.remove(LeftTupleIndexHashTable.java:386) at org.drools.core.phreak.RuleNetworkEvaluator.doUpdatesReorderLeftMemory(RuleNetworkEvaluator.java:799) at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:38) at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:547) at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:533) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:201) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:68) at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935) at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:952) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:926) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:232) at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:106) at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:32) at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:155) at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:76) at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:334) -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-with-LeftTupleIndexHashTable-remove-tp4028133.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] NullPointerException with LeftTupleIndexHashTable.remove()
Here is the unit test. Drools-LeftTupleIndexHashTable-61.zip http://drools.46999.n3.nabble.com/file/n4028135/Drools-LeftTupleIndexHashTable-61.zip Mark Proctor wrote Can you paste the 3 rules, that cause the issue? We’ll see if we can gleam something from that, while we wait for your unit test. Mark On 16 Feb 2014, at 19:25, nxv lt; nxvanderlinden@ gt; wrote: Hello, I keep trying to migrate drools from 5.5 to 6 on my project. I found a second regression/issue. I'm trying to produce a unit test for 6.1.0-SNAPSHOT but I face some difficulties to determine the cause of this issue. So I have a drl with 3 rules. I'm a bit disappointed because if I switch two rules (without modifying anything, just switch one rule with another in the drl file), the NPE disappears... Here is the stacktrace: java.lang.NullPointerException at org.drools.core.util.index.LeftTupleIndexHashTable.remove(LeftTupleIndexHashTable.java:386) at org.drools.core.phreak.RuleNetworkEvaluator.doUpdatesReorderLeftMemory(RuleNetworkEvaluator.java:799) at org.drools.core.phreak.PhreakJoinNode.doNode(PhreakJoinNode.java:38) at org.drools.core.phreak.RuleNetworkEvaluator.switchOnDoBetaNode(RuleNetworkEvaluator.java:547) at org.drools.core.phreak.RuleNetworkEvaluator.evalBetaNode(RuleNetworkEvaluator.java:533) at org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:334) at org.drools.core.phreak.RuleNetworkEvaluator.outerEval(RuleNetworkEvaluator.java:161) at org.drools.core.phreak.RuleNetworkEvaluator.evaluateNetwork(RuleNetworkEvaluator.java:116) at org.drools.core.phreak.RuleExecutor.reEvaluateNetwork(RuleExecutor.java:201) at org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:68) at org.drools.core.common.DefaultAgenda.fireNextItem(DefaultAgenda.java:935) at org.drools.core.common.DefaultAgenda.fireAllRules(DefaultAgenda.java:1200) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:952) at org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:926) at org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:232) at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:106) at org.drools.core.command.runtime.rule.FireAllRulesCommand.execute(FireAllRulesCommand.java:32) at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:155) at org.drools.core.command.runtime.BatchExecutionCommandImpl.execute(BatchExecutionCommandImpl.java:76) at org.drools.core.impl.StatelessKnowledgeSessionImpl.execute(StatelessKnowledgeSessionImpl.java:334) -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-with-LeftTupleIndexHashTable-remove-tp4028133.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/NullPointerException-with-LeftTupleIndexHashTable-remove-tp4028133p4028135.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator
Hello, I have the same problem with kie 6.1.0-SNAPSHOT :( Here is the unit test: Drools-after-61.zip http://drools.46999.n3.nabble.com/file/n4027965/Drools-after-61.zip nxv wrote The problem is the same as reported by abr. I work with abr on the project :) As he could not reproduce the bug, I just removed lines of code as much as possible to keep only the essentials. Here is a unit test: Drools-after.zip http://drools.46999.n3.nabble.com/file/n4027676/Drools-after.zip Davide Sottara wrote This is unlikely to be the same exception that started the initial thread, but a problem nevertheless.. :( could you create a self-contained test case and submit it? Thanks Davide On 01/13/2014 08:05 AM, Mark Proctor wrote: That was recreated on 5.6.0.CR1 ? The 5.6 ship has sailed now :( and currently there are no plans for 5.7 any time soon. We should focus on making sure this is fixed in 6.x. Mark On 12 Jan 2014, at 19:21, nxv lt; nxvanderlinden@ gt; lt;mailto: nxvanderlinden@ gt; wrote: Hello, I'm able to reproduce this issue with a KB containing only 1 rule. rule Qualification##ToControl salience 50 when $p: AccessRegisterSnapshot( $effDt: effectivedate ) $dpo: DeliveryPoint() $gCfg: GeneralConfig( ( todate == null || ( todate after[ 0d ] $effDt todate after[ 1ms ] fromdate ) ) ) from $dpo.generalConfigs then end This rule worked under drools 5.5.0.Final. Caused by: java.lang.NullPointerException at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) Davide Sottara wrote 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. -- View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027965.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator
The problem is the same as reported by abr. I work with abr on the project :) As he could not reproduce the bug, I just removed lines of code as much as possible to keep only the essentials. Here is a unit test: Drools-after.zip http://drools.46999.n3.nabble.com/file/n4027676/Drools-after.zip Davide Sottara wrote This is unlikely to be the same exception that started the initial thread, but a problem nevertheless.. :( could you create a self-contained test case and submit it? Thanks Davide On 01/13/2014 08:05 AM, Mark Proctor wrote: That was recreated on 5.6.0.CR1 ? The 5.6 ship has sailed now :( and currently there are no plans for 5.7 any time soon. We should focus on making sure this is fixed in 6.x. Mark On 12 Jan 2014, at 19:21, nxv lt; nxvanderlinden@ gt; lt;mailto: nxvanderlinden@ gt; wrote: Hello, I'm able to reproduce this issue with a KB containing only 1 rule. rule Qualification##ToControl salience 50 when $p: AccessRegisterSnapshot( $effDt: effectivedate ) $dpo: DeliveryPoint() $gCfg: GeneralConfig( ( todate == null || ( todate after[ 0d ] $effDt todate after[ 1ms ] fromdate ) ) ) from $dpo.generalConfigs then end This rule worked under drools 5.5.0.Final. Caused by: java.lang.NullPointerException at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) Davide Sottara wrote 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. -- View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027676.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users
Re: [rules-users] 5.6.0.CR1 gives a NullPointerException in after evaluator
Hello, I'm able to reproduce this issue with a KB containing only 1 rule. rule Qualification##ToControl salience 50 when $p: AccessRegisterSnapshot( $effDt: effectivedate ) $dpo: DeliveryPoint() $gCfg: GeneralConfig( ( todate == null || ( todate after[ 0d ] $effDt todate after[ 1ms ] fromdate ) ) ) from $dpo.generalConfigs then end This rule worked under drools 5.5.0.Final. Caused by: java.lang.NullPointerException at org.drools.base.evaluators.AfterEvaluatorDefinition$AfterEvaluator.evaluate(AfterEvaluatorDefinition.java:347) at org.drools.base.EvaluatorWrapper.evaluate(EvaluatorWrapper.java:99) Davide Sottara wrote 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@.jboss https://lists.jboss.org/mailman/listinfo/rules-users ___ rules-users mailing list rules-users@.jboss https://lists.jboss.org/mailman/listinfo/rules-users -- View this message in context: http://drools.46999.n3.nabble.com/5-6-0-CR1-gives-a-NullPointerException-in-after-evaluator-tp4026780p4027661.html Sent from the Drools: User forum mailing list archive at Nabble.com. ___ rules-users mailing list rules-users@lists.jboss.org https://lists.jboss.org/mailman/listinfo/rules-users