[jboss-jira] [JBoss JIRA] (JBRULES-3527) NullPointerException when marshalling InsertObjectCmd with XStream without setting entry point
Mark Proctor (JIRA)
jira-events at lists.jboss.org
Mon Nov 12 03:55:25 EST 2012
[ https://issues.jboss.org/browse/JBRULES-3527?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mark Proctor resolved JBRULES-3527.
-----------------------------------
Resolution: Out of Date
I believe this was already fixed at some point:
if ( StringUtils.isEmpty( this.entryPoint ) ) {
factHandle = ksession.insert( object );
} else {
factHandle = ksession.getWorkingMemoryEntryPoint( this.entryPoint ).insert( object );
}
> NullPointerException when marshalling InsertObjectCmd with XStream without setting entry point
> ----------------------------------------------------------------------------------------------
>
> Key: JBRULES-3527
> URL: https://issues.jboss.org/browse/JBRULES-3527
> Project: Drools
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: drools-core
> Affects Versions: 5.4.0.Final
> Environment: Windows
> Reporter: Chang Li
> Assignee: Mark Proctor
>
> The following code result in NullPointerException in the last step
> ArrayList<Command> commands = new ArrayList<Command>();
> BatchExecutionCommand batchCmd = CommandFactory.newBatchExecution(commands, "ksession1");
> MyObject myobj = new MyObject("name of object"); // just an example, not important to the bug.
> Command command = CommandFactory.newInsert(myobj, "myobject");
> commands.add(command);
> XStream marshaller = BatchExecutionHelper.newXStreamMarshaller();
> String xml = marshaller.toXML(batchCmd);
> The null pointer exception is caused by the "entry point" parameter not being set on teh InesrtObjectCommand.
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list