[rules-users] Null Pointer Exception with 10K+ kBase objects

jhusby husby024 at umn.edu
Tue Jan 28 12:02:48 EST 2014


Here is my test project:  DroolsTest.zip
<http://drools.46999.n3.nabble.com/file/n4027890/DroolsTest.zip>  

Change the TOTAL_OBJECTS member of Main.java to see the impact of having a
large number of objects:
 * If you set it to 1K, everything should work fine.
 * If you set it to 10K, it will NPE the first time but succeed afterward.
 * If you set it to 100K, it will NPE every time.

Thank you!

Joseph


Davide Sottara wrote
> Could you post the full test case (rules + java)?
> Thanks
> Davide
> 
> On 01/28/2014 05:10 PM, jhusby wrote:
>> I'm trying to stress-test Drools to see what its limits are, and I
>> stumbled
>> across a NPE when I have a large amount of facts in a stateful
>> knowledgebase:
>>
>> java.lang.NullPointerException
>> 	at
>> org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuple(PhreakTimerNode.java:355)
>> 	at
>> org.drools.core.phreak.PhreakTimerNode.doPropagateChildLeftTuples(PhreakTimerNode.java:325)
>> 	at
>> org.drools.core.phreak.PhreakTimerNode.doNode(PhreakTimerNode.java:72)
>> 	at
>> org.drools.core.phreak.RuleNetworkEvaluator.innerEval(RuleNetworkEvaluator.java:357)
>> 	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:200)
>> 	at
>> org.drools.core.phreak.RuleExecutor.evaluateNetworkAndFire(RuleExecutor.java:67)
>> 	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:957)
>> 	at
>> org.drools.core.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:931)
>> 	at
>> org.drools.core.impl.StatefulKnowledgeSessionImpl.fireAllRules(StatefulKnowledgeSessionImpl.java:256)
>>
>> I have a little program that creates, populates, fires, and destroys a
>> session repeatedly.  With 10K objects in the knowledge base, I get the
>> NPE
>> the first time I loop through my program, but not subsequently (probably
>> because by the subsequent executions things have been cached).  With 100K
>> objects, I get the exception most times.  With 1M objects, I get the NPE
>> every time.
>>
>> Am I doing anything wrong or is it simply taking so long to execute all
>> the
>> rules that something times out?  Is there a timeout param I could set?
>>
>> Thank you!
>>
>> Joseph





--
View this message in context: http://drools.46999.n3.nabble.com/Null-Pointer-Exception-with-10K-kBase-objects-tp4027887p4027890.html
Sent from the Drools: User forum mailing list archive at Nabble.com.


More information about the rules-users mailing list