[jboss-jira] [JBoss JIRA] Resolved: (JBRULES-2485) DROOLS-FLOW: NullPointerException when completing a Workitem with parameters after resuming the flow
Mauricio Salatino (JIRA)
jira-events at lists.jboss.org
Thu Apr 15 11:57:26 EDT 2010
[ https://jira.jboss.org/jira/browse/JBRULES-2485?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mauricio Salatino resolved JBRULES-2485.
----------------------------------------
Fix Version/s: 5.1.0.M2
Resolution: Done
done
> DROOLS-FLOW: NullPointerException when completing a Workitem with parameters after resuming the flow
> ----------------------------------------------------------------------------------------------------
>
> Key: JBRULES-2485
> URL: https://jira.jboss.org/jira/browse/JBRULES-2485
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-process
> Affects Versions: 5.1.0.M1
> Environment: N/A, but confirmed on Ubuntu and Windows
> Reporter: Anatoly Just Anatoly
> Assignee: Mauricio Salatino
> Priority: Blocker
> Fix For: 5.1.0.M2
>
>
> When trying to complete the work item [if it has ANY parameters mapped (e.g. <mapping type="in" from="someId" to="someId" />)], internally Drools Flow is using JPA persistence module to find ( retrieve ) a work item to be completed from a WorkItemInfo table.
> Interestingly enough, if you look at the "getWorkItem" method of the "org.drools.persistence.processinstance.WorkItemInfo", it passes a NULL for a RuleBase while setting up a context:
> 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 );
> And right after that, when trying to set parameters on the work item, it uses that RuleBase in MarshallerReaderContext:
> 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 );
> }
> }
> Again, this happens after the flow is resumed having workitem(s) with parameters [ in a different thread / execution ] after the flow was suspended... Also I did not find any framework tests for it [ separate threaded (real life) ones ]
> /Anatoly
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list