-
Bug
-
Resolution: Done
-
Major
-
6.0.0
Description of problem:
I receive the NPE when I try to create XStream XML BatchExecutionHelper.newXStreamMarshaller().toXML(command);
To create the batch execution command I proceed:
Message mo = new Message();
mo.setText("ahoj");
InsertObjectCommand c = new InsertObjectCommand(mo, "message");
List<Command<?>> cmds = new ArrayList<Command<?>>();
Command insertObjectCommand = CommandFactory.newInsert(mo, "message", true, "DEFAULT"); // here I must set the DEFAULT entry point otherwise I get the NPE
cmds.add( insertObjectCommand );
cmds.add(CommandFactory.newFireAllRules());
BatchExecutionCommand command = CommandFactory.newBatchExecution(cmds, "ksession1");
Below is the stacktrace of NPE.
java.lang.NullPointerException
at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.writeText(PrettyPrintWriter.java:231)
at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.writeAttributeValue(PrettyPrintWriter.java:223)
at com.thoughtworks.xstream.io.xml.PrettyPrintWriter.addAttribute(PrettyPrintWriter.java:218)
at com.thoughtworks.xstream.io.WriterWrapper.addAttribute(WriterWrapper.java:41)
at org.drools.core.runtime.help.impl.XStreamXML$InsertConverter.marshal(XStreamXML.java:116)
It should be enough to set "private String entryPoint = "DEFAULT";" in InsertObjectCommand
Version-Release number of selected component (if applicable):
How reproducible:
Steps to Reproduce:
1.
2.
3.
Actual results:
Expected results:
Additional info: