Bug 999073 - A RemoteJmsRuntimeEngineFactory (JMS type) created with a non existent deployment throws NPE.
A RemoteJmsRuntimeEngineFactory (JMS type) created with a non existent deploy...
Status: CLOSED CURRENTRELEASE
Product: JBoss BPMS Platform 6
Classification: JBoss
Component: jBPM Core (Show other bugs)
6.0.0
Unspecified Unspecified
unspecified Severity unspecified
: ER4
: 6.0.0
Assigned To: Marco Rietveld
Ivo Bek
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-08-20 13:23 EDT by Marek Baluch
Modified: 2016-09-20 01:04 EDT (History)
1 user (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-08-06 16:12:03 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marek Baluch 2013-08-20 13:23:59 EDT
Description of problem:
The following code will throw the stack trace in 'Stack-Trace:' section. Initialization of the RemoteRuntimeEngineFactory was made to create a JMS client.

RemoteRuntimeEngineFactory factory = new RemoteJmsRuntimeEngineFactory(/* ... */);
RuntimeEngine runtimeEngine = factory.newRuntimeEngine();
KieSession kieSession = runtimeEngine.getKieSession();
kieSession.startProcess("processId", null);


Stack-Trace:
java.lang.NullPointerException
	at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeJmsCommand(AbstractRemoteCommandObject.java:155)
	at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:80)
	at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:229)
	at org.perfcake.message.sender.jbpm.KieSessionBasedSender.doSend(KieSessionBasedSender.java:44)
	at org.perfcake.message.sender.AbstractSender.send(AbstractSender.java:102)
	at org.perfcake.message.generator.SenderTask.run(SenderTask.java:125)
	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
	at java.util.concurrent.FutureTask.run(FutureTask.java:166)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
Comment 1 Marco Rietveld 2013-09-04 06:40:07 EDT
This was fixed along the way by a number of small commits. 

This method here: 

https://github.com/droolsjbpm/droolsjbpm-integration/blob/6.0.x/kie-remote/kie-services-remote/src/main/java/org/kie/services/remote/jms/RequestMessageBean.java#L253

now makes sure that the NPE doesn't happen.
Comment 5 Ivo Bek 2013-10-16 08:13:54 EDT
Verified in BPMS 6.0.0.ER4

Note You need to log in before you can comment on or make changes to this bug.