I understand, and completely agree.

I spent my past few rides on the train stripping my problem code down to the
bare DroolsTest.java (along with one or two simple JavaBeans) and a
Sample.drl that clearly demonstrates the symptom.  As soon as I get that
sufficiently simplified/cleaned up I will post it to a JIRA.

However, as you suggest I fully intend to continue to my own investigation
in the hopes of providing a patch file (though I haven't yet cracked open
the code).  Hence the questions in my original posting, specifically,

* What do the numbers in parenthesis in the Audit view represent?
* Is it bad to have one containing -1?

I'm going to try to post to a JIRA either today or tomorrow.

Thanks for your patience.
-Mitch

-----Original Message-----
From: Mark Proctor [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 27, 2006 11:33 AM
To: [email protected]
Subject: Re: [drools-user] NPE on retract()

Mitch,

The problem is this isn't something we can answer quickly. As we will 
need to get the example running and delve deep - so it will get 
scheduled along with the other bugs we need to look into. If there isn't 
a jira for it, the chances are it might be forgotten. The same is true 
for the enhancement reqeusts for the Audit View.

The ideal thing for self contained tests is they should unzip into our 
drools-examples project so we can run them out of the box, like the 
other examples. Even better still attach a patch to fix the error :)

Mark
Mitch Christensen wrote:
> No Problem.
>
> But does posting a JIRA preclude getting answers to my questions regarding
> the Audit view?
>
> -Mitch
>
> -----Original Message-----
> From: Michael Neale [mailto:[EMAIL PROTECTED] 
> Sent: Wednesday, April 26, 2006 4:04 PM
> To: [email protected]
> Subject: Re: [drools-user] NPE on retract()
>
> no we *really* need to be able to reproduce it with a test. otherwise its
> hours of guess work, versus minutes of finding out what the problem is. We
> would then add it to the integration suite to make sure it doesnt' regress
> again.
>
> On 4/27/06, Mitch Christensen <[EMAIL PROTECTED]> wrote:
>   
>> Hey,
>>
>> Unfortunately I continue to get the NPE.  I would be happy to post the
>> problem to a JIRA, but before I do I have a few questions, the answer to
>> which might help me in my ability to characterize the problem.
>>
>> First off, it would be great to be able to copy from the Audit view. :)
>> Also, the Audit view doesn't seem to wrap.  It chops off the right edge
of
>> long lines even after I scroll fully to the right.
>>
>> Now, I assume that the number(s) in parenthesis at the end of each
>> activation message in the Audit view is the equivalent of a fact-id?  If
>> so,
>> would it be bad to have a (-1) show up?  It does show up, but often
enough
>> that I'm not sure it's a problem.
>>
>> I've attached the event.log file in case that might help.
>>
>> Also, what exactly should I attach to the JIRA?  Should I ZIP up the
>> entire
>> (though rather small) Eclipse project?
>>
>> Thanks again for your help.
>>
>> -Mitch
>>
>>
>> -----Original Message-----
>> From: Michael Neale [mailto:[EMAIL PROTECTED]
>> Sent: Tuesday, April 25, 2006 6:30 PM
>> To: [email protected]
>> Subject: Re: [drools-user] NPE on retract()
>>
>> if you are still getting it, would be be possible to bundle up a self
>> contained  test and attach it to a JIRA?
>> As it is, we can't reproduce it, but would like to !
>>
>> Michael.
>>
>> On 4/25/06, Mitch Christensen <[EMAIL PROTECTED]> wrote:
>>     
>>> Hey,
>>>
>>>
>>>
>>> I was cranking along writing rules when all of a sudden JUnit reported
>>>       
>> an
>>     
>>> NPE (see below) during WorkingMemory.fireAllRules().  The rule
>>>       
>> referenced
>>     
>>> in
>>> the stack trace is as follows,
>>>
>>>
>>>
>>> rule "Add report periods to the FEQueryList"
>>>
>>>       when
>>>
>>>             tr : TimeRange(level == TimeRange.FE, durationInMillis > 0 )
>>>
>>>             ctx : HashMap()
>>>
>>>             eval(ctx.containsKey("FEQueryList"))
>>>
>>>       then
>>>
>>>             System.out.println("Adding FE period to the list");
>>>
>>>             Vector v = (Vector)ctx.get("FEQueryList");
>>>
>>>             HashMap m = new HashMap();
>>>
>>>             v.add(m);
>>>
>>>             m.put("st", new Long(tr.getStartTime()));
>>>
>>>             m.put("et", new Long(tr.getEndTime()));
>>>
>>>             m.put("relation", "PMI_FE");
>>>
>>>             retract(tr);
>>>
>>> end
>>>
>>>
>>>
>>> The NPE occurs on the retract() on the last line of the consequence.
>>>
>>>
>>>
>>> I'm not exactly sure what to do about it.  I suppose I could look at the
>>> code.
>>>
>>>
>>>
>>> Any suggestions?
>>>
>>>
>>>
>>> Thanks.
>>>
>>> -MItch
>>>
>>>
>>>
>>> org.drools.spi.ConsequenceException: java.lang.NullPointerException
>>>
>>>             at org.drools.common.Agenda.fireActivation(Agenda.java:327)
>>>
>>>             at org.drools.common.Agenda.fireNextItem(Agenda.java:303)
>>>
>>>             at
>>> org.drools.reteoo.WorkingMemoryImpl.fireAllRules(WorkingMemoryImpl.java
>>> :248)
>>>
>>>             at
>>> org.drools.reteoo.WorkingMemoryImpl.fireAllRules(WorkingMemoryImpl.java
>>> :261)
>>>
>>>             at
>>>
>>>
>>>       
>>     
>
com.packetmotion.trinity.gsm.report.RuleEngineTest.testContextBuilderFe2Dail
>   
>>> y(RuleEngineTest.java:358)
>>>
>>>             at sun.reflect.NativeMethodAccessorImpl.invoke0(Native
>>>       
>> Method)
>>     
>>>             at
>>> sun.reflect.NativeMethodAccessorImpl.invoke(
>>>       
>> NativeMethodAccessorImpl.java
>>     
>>> :39
>>> )
>>>
>>>             at
>>> sun.reflect.DelegatingMethodAccessorImpl.invoke
>>> (DelegatingMethodAccessorImpl
>>> .java:25)
>>>
>>>             at java.lang.reflect.Method.invoke(Method.java:324)
>>>
>>>             at junit.framework.TestCase.runTest(TestCase.java:154)
>>>
>>>             at junit.framework.TestCase.runBare(TestCase.java:127)
>>>
>>>             at junit.framework.TestResult$1.protect(TestResult.java:106)
>>>
>>>             at junit.framework.TestResult.runProtected(TestResult.java
>>> :124)
>>>
>>>             at junit.framework.TestResult.run(TestResult.java:109)
>>>
>>>             at junit.framework.TestCase.run(TestCase.java:118)
>>>
>>>             at junit.framework.TestSuite.runTest(TestSuite.java:208)
>>>
>>>             at junit.framework.TestSuite.run(TestSuite.java:203)
>>>
>>>             at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests
>>> (RemoteTestRu
>>> nner.java:481)
>>>
>>>             at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run
>>> (RemoteTestRunner.
>>> java:347)
>>>
>>>             at
>>> org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main
>>> (RemoteTestRunner
>>> .java:197)
>>>
>>> Caused by: java.lang.NullPointerException
>>>
>>>             at
>>> org.drools.reteoo.beta.DefaultRightMemory.remove(DefaultRightMemory.java
>>> :64)
>>>
>>>             at org.drools.reteoo.BetaMemory.remove(BetaMemory.java:150)
>>>
>>>             at org.drools.reteoo.NotNode.retractObject(NotNode.java:178)
>>>
>>>             at
>>> org.drools.reteoo.ObjectSource.propagateRetractObject(ObjectSource.java
>>> :128)
>>>
>>>             at
>>> org.drools.reteoo.ObjectTypeNode.retractObject(ObjectTypeNode.java:152)
>>>
>>>             at org.drools.reteoo.Rete.retractObject(Rete.java:153)
>>>
>>>             at
>>> org.drools.reteoo.RuleBaseImpl.retractObject(RuleBaseImpl.java:272)
>>>
>>>             at
>>> org.drools.reteoo.WorkingMemoryImpl.retractObject(WorkingMemoryImpl.java
>>> :601
>>> )
>>>
>>>             at
>>> org.drools.base.DefaultKnowledgeHelper.retractObject
>>> (DefaultKnowledgeHelper.
>>> java:87)
>>>
>>>             at
>>>
>>>
>>>       
>>     
>
com.packetmotion.trinity.sqlgen.ContextBuilder.Rule_Add_report_periods_to_th
>   
>>>       
>>     
>
e_FEQueryList_0.consequence(Rule_Add_report_periods_to_the_FEQueryList_0.jav
>   
>>> a:23)
>>>
>>>             at
>>>
>>>
>>>       
>>     
>
com.packetmotion.trinity.sqlgen.ContextBuilder.Rule_Add_report_periods_to_th
>   
>>>       
>>     
>
e_FEQueryList_0ConsequenceInvoker.evaluate(Rule_Add_report_periods_to_the_FE
>   
>>> QueryList_0ConsequenceInvoker.java:22)
>>>
>>>             at org.drools.common.Agenda.fireActivation(Agenda.java:325)
>>>
>>>             ... 19 more
>>>
>>>
>>>
>>>
>>>
>>>       
>>     
>
>
>
>
>   



Reply via email to