[rules-users] Resuming Flow: NPE when completing a work item
nanic23
nanic23 at hotmail.com
Wed Apr 14 09:59:51 EDT 2010
Hi Mauricio,
Thank you very much for you comments. I am mapping a single variable type
Long.
Could you please look at posts above as I think they might have a good
point. There it seems that the getWorkItem method is creating a
MarshallerReaderContext with a "null" value for the ruleBase argument:
public WorkItem getWorkItem() {
if ( workItem == null ) {
try {
ByteArrayInputStream bais = new ByteArrayInputStream(
workItemByteArray );
MarshallerReaderContext context = new
MarshallerReaderContext( bais,
null, // THIS IS a RULEBASE <<<<<<<<<<<<<
null,
null );
workItem = InputMarshaller.readWorkItem( context );
This in turn ends up creating a NPE when the "null" ruleBase is used.
protected Class< ? > resolveClass(ObjectStreamClass desc) throws
IOException, ClassNotFoundException {
String name = desc.getName();
try {
return Class.forName(name, false,
this.ruleBase.getRootClassLoader()); // HERE IS WHERE THE NULL POINTER
EXCEPTION OCCURS <<<<<<<<<<<<<<<<<<<<<<< since the RuleBase is NULL
} catch (ClassNotFoundException ex) {
return super.resolveClass( desc );
}
}
This is explained in more detail in the posts above. Do you think this could
be the issue? Am I following (and understanding) Drools src code correctly?
I appreciate your help!
Thanks,
Nick.
--
View this message in context: http://n3.nabble.com/Resuming-Flow-NPE-when-completing-a-work-item-tp716847p718601.html
Sent from the Drools - User mailing list archive at Nabble.com.
More information about the rules-users
mailing list