[rules-users] Error on access variable in workingmemorylogger

Edson Tirelli tirelli at post.com
Wed Apr 9 11:43:45 EDT 2008


   Ok, ignore my last e-mail.

   []s
   Edson

2008/4/9 Edson Tirelli <tirelli at post.com>:

>
>    Can you plz open a JIRA with your test case?
>
>    Thanks.
>
>
> 2008/4/9 vdelbart <delbart.v at mipih.fr>:
>
>
> > Hello,
> >
> > I have an error on WorkingMemoryLogger with this rule :
> >
> > package example
> > import mcmipih.rules.demo.model.*;
> > global Param param;
> >
> > rule "Your Third Rule"
> >        dialect "mvel"
> >        when
> >                Param( iep : IEP  ) from param
> >        then
> >                System.out.println("Iep de param " + iep);
> > end
> >
> > The error :
> >
> > java.lang.NullPointerException
> >        at
> >
> > org.drools.base.mcmipih.rules.demo.model.Param22676229$getIEP.getValue(Unknown
> > Source)
> >        at
> >
> > org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)
> >        at org.drools.rule.Declaration.getValue(Declaration.java:198)
> >        at
> >
> > org.drools.audit.WorkingMemoryLogger.extractDeclarations(WorkingMemoryLogger.java:265)
> >        at
> >
> > org.drools.audit.WorkingMemoryLogger.activationCreated(WorkingMemoryLogger.java:199)
> >        at
> >
> > org.drools.event.AgendaEventSupport.fireActivationCreated(AgendaEventSupport.java:75)
> >        at
> >
> > org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:331)
> >        at
> >
> > org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:137)
> >        at
> >
> > org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)
> >        at org.drools.reteoo.FromNode.assertTuple(FromNode.java:90)
> >        at
> >
> > org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)
> >        at
> >
> > org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)
> >        at
> >
> > org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)
> >        at
> > org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)
> >        at org.drools.reteoo.Rete.assertObject(Rete.java:175)
> >        at
> > org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)
> >        at
> >
> > org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:179)
> >        at
> >
> > org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1315)
> >        at
> >
> > org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:462)
> >        at
> >
> > org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)
> >        at
> >
> > execute.ExecReglesWorkingMemory.testExecReglesWorkingMemory(ExecReglesWorkingMemory.java:107)
> >        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:585)
> >        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
> >
> > org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)
> >        at
> >
> > org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)
> >        at
> >
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)
> >        at
> >
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)
> >        at
> >
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)
> >        at
> >
> > org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)
> >
> >
> > The workingmemorylogger wants to show the value of the variable iep even
> > if
> > my 'param' is not present in the working memory !
> >
> > Is it a bug ?
> >
> > thanks for your help,
> >
> > regards,
> >
> > V.
> >
> >
> >
> >
> >
> >
> >
> > --
> > View this message in context:
> > http://www.nabble.com/Error-on-access-variable-in-workingmemorylogger-tp16581343p16581343.html
> > Sent from the drools - user mailing list archive at Nabble.com.
> >
> > _______________________________________________
> > rules-users mailing list
> > rules-users at lists.jboss.org
> > https://lists.jboss.org/mailman/listinfo/rules-users
> >
>
>
>
> --
> Edson Tirelli
> JBoss Drools Core Development
> Office: +55 11 3529-6000
> Mobile: +55 11 9287-5646
> JBoss, a division of Red Hat @ www.jboss.com




-- 
Edson Tirelli
JBoss Drools Core Development
Office: +55 11 3529-6000
Mobile: +55 11 9287-5646
JBoss, a division of Red Hat @ www.jboss.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/rules-users/attachments/20080409/443ad4e7/attachment.html 


More information about the rules-users mailing list