Bug 999073 - A RemoteJmsRuntimeEngineFactory (JMS type) created with a non existent deployment throws NPE.
Summary: A RemoteJmsRuntimeEngineFactory (JMS type) created with a non existent deploy...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: jBPM Core
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ER4
: 6.0.0
Assignee: Marco Rietveld
QA Contact: Ivo Bek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-08-20 17:23 UTC by Marek Baluch
Modified: 2016-09-20 05:04 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 20:12:03 UTC
Type: Bug


Attachments (Terms of Use)

Description Marek Baluch 2013-08-20 17:23:59 UTC
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 10:40:07 UTC
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 12:13:54 UTC
Verified in BPMS 6.0.0.ER4


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