This may be <a href="http://jira.jboss.org/jira/browse/JBRULES-1415">http://jira.jboss.org/jira/browse/JBRULES-1415</a> <br><br>cheers<br>Steve<br><br><div class="gmail_quote">On Wed, Apr 9, 2008 at 5:37 PM, vdelbart &lt;<a href="mailto:delbart.v@mipih.fr">delbart.v@mipih.fr</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
Hello,<br>
<br>
I have an error on WorkingMemoryLogger with this rule :<br>
<br>
package example<br>
import mcmipih.rules.demo.model.*;<br>
global Param param;<br>
<br>
rule &quot;Your Third Rule&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;dialect &quot;mvel&quot;<br>
 &nbsp; &nbsp; &nbsp; &nbsp;when<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Param( iep : IEP &nbsp;) from param<br>
 &nbsp; &nbsp; &nbsp; &nbsp;then<br>
 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;System.out.println(&quot;Iep de param &quot; + iep);<br>
end<br>
<br>
The error :<br>
<br>
java.lang.NullPointerException<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.base.mcmipih.rules.demo.model.Param22676229$getIEP.getValue(Unknown<br>
Source)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.drools.rule.Declaration.getValue(Declaration.java:198)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.audit.WorkingMemoryLogger.extractDeclarations(WorkingMemoryLogger.java:265)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.audit.WorkingMemoryLogger.activationCreated(WorkingMemoryLogger.java:199)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.event.AgendaEventSupport.fireActivationCreated(AgendaEventSupport.java:75)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:331)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:137)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.SingleTupleSinkAdapter.propagateAssertTuple(SingleTupleSinkAdapter.java:20)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.drools.reteoo.FromNode.assertTuple(FromNode.java:90)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.SingleTupleSinkAdapter.createAndPropagateAssertTuple(SingleTupleSinkAdapter.java:55)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.LeftInputAdapterNode.assertObject(LeftInputAdapterNode.java:116)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:22)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.drools.reteoo.ObjectTypeNode.assertObject(ObjectTypeNode.java:153)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.drools.reteoo.Rete.assertObject(Rete.java:175)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at org.drools.reteoo.ReteooRuleBase.assertObject(ReteooRuleBase.java:192)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.reteoo.ReteooWorkingMemory$WorkingMemoryReteAssertAction.execute(ReteooWorkingMemory.java:179)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.common.AbstractWorkingMemory.executeQueuedActions(AbstractWorkingMemory.java:1315)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:462)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.drools.common.AbstractWorkingMemory.fireAllRules(AbstractWorkingMemory.java:433)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
execute.ExecReglesWorkingMemory.testExecReglesWorkingMemory(ExecReglesWorkingMemory.java:107)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at java.lang.reflect.Method.invoke(Method.java:585)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at junit.framework.TestCase.runTest(TestCase.java:154)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at junit.framework.TestCase.runBare(TestCase.java:127)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at junit.framework.TestResult$1.protect(TestResult.java:106)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at junit.framework.TestResult.runProtected(TestResult.java:124)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at junit.framework.TestResult.run(TestResult.java:109)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at junit.framework.TestCase.run(TestCase.java:118)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.eclipse.jdt.internal.junit.runner.junit3.JUnit3TestReference.run(JUnit3TestReference.java:128)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.eclipse.jdt.internal.junit.runner.TestExecution.run(TestExecution.java:38)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:460)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:673)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:386)<br>
 &nbsp; &nbsp; &nbsp; &nbsp;at<br>
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)<br>
<br>
<br>
The workingmemorylogger wants to show the value of the variable iep even if<br>
my &#39;param&#39; is not present in the working memory !<br>
<br>
Is it a bug ?<br>
<br>
thanks for your help,<br>
<br>
regards,<br>
<br>
V.<br>
<font color="#888888"><br>
<br>
<br>
<br>
<br>
<br>
<br>
--<br>
View this message in context: <a href="http://www.nabble.com/Error-on-access-variable-in-workingmemorylogger-tp16581343p16581343.html" target="_blank">http://www.nabble.com/Error-on-access-variable-in-workingmemorylogger-tp16581343p16581343.html</a><br>

Sent from the drools - user mailing list archive at Nabble.com.<br>
<br>
_______________________________________________<br>
rules-users mailing list<br>
<a href="mailto:rules-users@lists.jboss.org">rules-users@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/rules-users" target="_blank">https://lists.jboss.org/mailman/listinfo/rules-users</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Steven Williams<br><br>Supervising Consultant<br><br>Object Consulting<br>Office: 8615 4500 Mob: 0439 898 668 Fax: 8615 4501<br><a href="mailto:steven.williams@objectconsulting.com.au">steven.williams@objectconsulting.com.au</a><br>
<a href="http://www.objectconsulting.com.au">www.objectconsulting.com.au</a><br><br>consulting | development | training | support<br>our experience makes the difference