[jboss-jira] [JBoss JIRA] Updated: (JBRULES-612) NPE on asserting facts before reading rules with retract

Justine Hlista (JIRA) jira-events at jboss.com
Thu Jan 18 16:05:53 EST 2007


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

Justine Hlista updated JBRULES-612:
-----------------------------------

    Attachment: test.tar.gz

The tar contains the following files to reproduce the NPE:

testCase.java -- the main driver source that asserts 2 facts, reads a rule file, then fires the rules
factA.java -- simple fact asserted in main driver
factB.java -- another simple fact asserted in main driver
factC.java -- simple fact asserted within rule in testCase.drl
testCase.drl -- 2 simple rules: the first is triggered by factA and asserts factC, the second is triggered by factB, factA, and factC and retracts factB and modifies factC
NPE.txt -- the stack trace for the resulting null pointer


> NPE on asserting facts before reading rules with retract
> --------------------------------------------------------
>
>                 Key: JBRULES-612
>                 URL: http://jira.jboss.com/jira/browse/JBRULES-612
>             Project: JBoss Rules
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>    Affects Versions: 3.0.5
>         Environment: Windows XP, JDK 1.5.0_07
>            Reporter: Justine Hlista
>         Assigned To: Mark Proctor
>         Attachments: test.tar.gz
>
>
> I have a scenario that asserts two simple facts, then reads a rule file, then fires the rules. One of the rules retracts one of the facts, then modifies another object. An NPE results when things are run as in the attached files.
> However, if the rule file is read first, then the facts are asserted, there is no NPE.
> Alternatively, if the second rule, the consequence of which retracts one of the facts, is modified so that the retract is the last statement in the consequence, then the NPE does not occur, even if the facts are asserted before the rules are read.

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