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

Mattias Nilsson (JIRA) jira-events at lists.jboss.org
Sat Jan 12 16:24:19 EST 2008


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


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)
. . .

-- 
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