Bug 1192054 - NullPointer when changing order of the rules
Summary: NullPointer when changing order of the rules
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: BRE
Version: 6.2.0
Hardware: Unspecified
OS: Unspecified
high
unspecified
Target Milestone: ER6
: 6.1.0
Assignee: Mario Fusco
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-02-12 14:14 UTC by Mario Fusco
Modified: 2023-09-14 02:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 19:02:45 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker DROOLS-707 0 Major Resolved NullPointer when changing order of the rules 2017-10-02 02:58:29 UTC

Description Mario Fusco 2015-02-12 14:14:51 UTC
We are having some serious issues with some rules, they are throwing a NullPointerException and we don't understand why. I have tried to narrow down the problem to the smallest rule possible, now this rule doesn't really make much sense put like this but the real rule is more complex with more constraints. At the end the result is the same: a NPE.

I have tried it with many Drools versions from 5.x to latest 6.3.0-SNAPSHOT.

I tested this in isolation with the minimum amount of code possible, and attached it as well if someone wants to try it quickly.

Note that if line 2 of the when:
$a : Integer()
is moved as first line, the rule runs ok.

Please find the reproducer here: https://groups.google.com/forum/#!topic/drools-usage/-oNqu3l4cqE

Comment 1 Mario Fusco 2015-02-12 14:15:25 UTC
Fixed by https://github.com/droolsjbpm/drools/commit/ef552a6f1

Comment 2 Mario Fusco 2015-02-25 16:15:36 UTC
Cherry-picked to 6.2.x with https://github.com/droolsjbpm/drools/commit/eec8bfc4bf0192c66f54c28e6a2ba690b0a5fb82

Comment 4 jvahala 2015-03-09 14:37:20 UTC
Reproduced on old version. With 6.2.0.Final-redhat-2 NPE is no longer thrown. Verified

Comment 6 Red Hat Bugzilla 2023-09-14 02:54:48 UTC
The needinfo request[s] on this closed bug have been removed as they have been unresolved for 1000 days


Note You need to log in before you can comment on or make changes to this bug.