Bug 995436
| Summary: | NPE when entry-point is not set for InsertObjectCommand | ||
|---|---|---|---|
| Product: | [Retired] JBoss BPMS Platform 6 | Reporter: | Ivo Bek <ibek> |
| Component: | jBPM Core | Assignee: | Kris Verlaenen <kverlaen> |
| Status: | CLOSED CURRENTRELEASE | QA Contact: | Ivo Bek <ibek> |
| Severity: | unspecified | Docs Contact: | |
| Priority: | unspecified | ||
| Version: | 6.0.0 | CC: | atangrin, rzhang |
| Target Milestone: | ER4 | ||
| Target Release: | 6.0.0 | ||
| Hardware: | Unspecified | ||
| OS: | Unspecified | ||
| Whiteboard: | |||
| Fixed In Version: | Doc Type: | Bug Fix | |
| Doc Text: | Story Points: | --- | |
| Clone Of: | Environment: | ||
| Last Closed: | 2014-08-06 20:12:13 UTC | Type: | Bug |
| Regression: | --- | Mount Type: | --- |
| Documentation: | --- | CRM: | |
| Verified Versions: | Category: | --- | |
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
| Cloudforms Team: | --- | Target Upstream Version: | |
| Embargoed: | |||
Seems that the method newInsert sets null endpoint: getCommandFactoryProvider().newInsert( object,outIdentifier,true, null ); So, the change didn't helped. Then I propose to change the setEntryPoint method to prevent set null entry point. Here is the pull request I propose https://github.com/droolsjbpm/drools/pull/258 also for the other commands which use entry point. 6.0.x: http://github.com/droolsjbpm/drools/commit/23be9bda3 master: http://github.com/droolsjbpm/drools/commit/b71b48d89 Verified in BPMS 6.0.0.ER4 |
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: