[rules-users] NullPointerException @ modify()

H.C. canterburry at gmail.com
Fri May 14 17:59:12 EDT 2010


OK...

Did some digging in drools source code and found this:

Line 151 in RightInputAdapterNode:

// retrieve handle from memory
final InternalFactHandle factHandle = (InternalFactHandle) memory.remove(
tuple );

Tuple value:
[fact 0:-1:0:1711615772:41:null]
[fact
0:40:260358:2136057917:40:com.biperf.optumhealth.domain.Activity at 7f51a83d]
[fact
0:1:32722618:32722618:1:com.biperf.optumhealth.rules.ResultContext at 1f34eba]

WorkingMemory value:
[fact 0:-1:0:1711615772:41:null]
[fact
0:40:260358:2136057917:40:com.biperf.optumhealth.domain.Activity at 7f51a83d]
[fact
0:1:32722618:32722618:1:com.biperf.optumhealth.rules.ResultContext at 1f34eba]

After executing the above line, factHandle == null which causes the next
line to throw a NullPointer:

for ( RightTuple rightTuple = factHandle.getRightTuple(); rightTuple !=
null; rightTuple = (RightTuple) rightTuple.getHandleNext() ) {
            rightTuple.getRightTupleSink().retractRightTuple( rightTuple,
                                                              context,
                                                              workingMemory
);
}

Be happy to do some more digging given some direction....


-- 
View this message in context: http://drools-java-rules-engine.46999.n3.nabble.com/NullPointerException-modify-tp818403p818479.html
Sent from the Drools - User mailing list archive at Nabble.com.



More information about the rules-users mailing list