[jboss-jira] [JBoss JIRA] Updated: (JBRULES-1415) Certain uses of from causes NullPointerException in WorkingMemoryLogger

Mark Proctor (JIRA) jira-events at lists.jboss.org
Wed Mar 12 13:00:15 EDT 2008


     [ http://jira.jboss.com/jira/browse/JBRULES-1415?page=all ]

Mark Proctor updated JBRULES-1415:
----------------------------------

    Fix Version/s: 4.0.5
                   5.0.0-M1
         Assignee: Kris Verlaenen

> Certain uses of from causes NullPointerException in WorkingMemoryLogger
> -----------------------------------------------------------------------
>
>                 Key: JBRULES-1415
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-1415
>             Project: JBoss Drools
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 4.0.3
>            Reporter: Mattias Nilsson
>         Assigned To: Kris Verlaenen
>             Fix For: 5.0.0-M1, 4.0.5
>
>         Attachments: testcase.zip
>
>
> This rule causes a NullPointerException when WorkingMemoryFileLogger is activated. Without the logger the rule works fine.
> rule "TestRule"
>    when
>       A( theList : list )
>       B( theName : name ) from theList
>    then
>       System.out.println( "ok" ); 
> end
> Seems to be the assigning of variable theName that causes the problem. If i remove "theName : name" there is no NullPointerException. Here is the stack trace:
> java.lang.NullPointerException
>         at org.drools.base.com.sample.DroolsTest$B15799300$getName.getValue(Unknown Source)
>         at org.drools.base.ClassFieldExtractor.getValue(ClassFieldExtractor.java:127)
>         at org.drools.rule.Declaration.getValue(Declaration.java:197)
>         at org.drools.audit.WorkingMemoryLogger.extractDeclarations(WorkingMemoryLogger.java:267)
>         at org.drools.audit.WorkingMemoryLogger.activationCreated(WorkingMemoryLogger.java:201)
>         at org.drools.event.AgendaEventSupport.fireActivationCreated(AgendaEventSupport.java:75)
>         at org.drools.reteoo.RuleTerminalNode.assertTuple(RuleTerminalNode.java:331)
> . . .
> I have attached a testcase that reproduces the problem.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list