Hello Guys,

I'm having a NPE in the ClassFieldExtractor.getValue(InternalWorkingMemory,
Object) line: 127

It happens while executing the RHS of a rule that modifies one fact and then
updates one and retract another.

rule "foo"

when
    ...
then
    // apply changes
    PolicyHelper.makeInPolicy($room, $pRoom.getCompliantRuleId(),
    $pRoom.getPrefLevel(), ProfileTypeEnum.COMPANY);

    update($room);
    retract($pRoom);
end

--

We're using good old 4.0.7, with ShadowFacts :(

I tracked down the problem to

FactHandleIndexHashTable$FieldIndexEntry.matches(ReteTuple, int) line:
> 385
>

Where,

this.first.getFactHandle()
>

Returns an invalidated fact handle (a handle of a fact that has been
retracted before, I imagine). The NPE happens because invalidated handles
have their "object" attribute
set to "null" and the matches method mentioned above does:

        public boolean matches(final ReteTuple tuple,
>                                final int tupleHashCode) {
>             return this.hashCode == tupleHashCode && this.index.equal( *
> this.first.getFactHandle().getObject()*,
>
> tuple );
>


Is there something I could do to workaround this problem? Any clue is
welcome.

Thanks,
Leo.
_______________________________________________
rules-users mailing list
[email protected]
https://lists.jboss.org/mailman/listinfo/rules-users

Reply via email to