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: user@drools.codehaus.org
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