Getting 404 for REST API on JBPM 6.1
contegomatt Aug 27, 2015 11:56 AMHi
I am running JBPM 6.1.
I am trying to develop a client app using the Remote API (Chapter 17. Remote API) but when I try to invoke the service to start a process I get a 404 error. The code fragment is below (Note : I have changed server names, deployment IDs etc to protect myself)
RemoteRuntimeEngineFactory restSession = new RemoteRestRuntimeEngineFactory(
"myDeploymentID",
new URL("http://myserver.com/business-central/"), "username", "password");
RemoteRuntimeEngine engine = restSession.newRuntimeEngine();
KieSession ksession = engine.getKieSession();
TaskService taskService = engine.getTaskService();
ProcessInstance processInstance = ksession.startProcess("deploymentID");
but when run I get this exception
Exception in thread "main" org.jboss.resteasy.client.ClientResponseFailure: Unable to find a MessageBodyReader of content-type text/html;charset="utf-8" and type null
at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:523)
at org.jboss.resteasy.client.core.BaseClientResponse.createResponseFailure(BaseClientResponse.java:514)
at org.jboss.resteasy.client.core.BaseClientResponse.readFrom(BaseClientResponse.java:415)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:377)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:350)
at org.jboss.resteasy.client.core.BaseClientResponse.getEntity(BaseClientResponse.java:344)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:406)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.execute(AbstractRemoteCommandObject.java:120)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:230)
at org.drools.core.command.impl.CommandBasedStatefulKnowledgeSession.startProcess(CommandBasedStatefulKnowledgeSession.java:221)
at com.contego.main.TestJBPMClient.main(TestJBPMClient.java:30)
Sniffing the TCP traffic, I can see that it is getting a 404 response with this message
RESTEASY001185: Could not find resource for relative : /runtime/deploymentID/execute of full path: http://myserver.com/business-central/rest/runtime/deploymentID/execute
I saw in another post (BRMS 6 JBPM REST interface seems not working) a suggestion that the suite is installed in authoring mode, not runtime mode. There is no information on how to install in runtime mode, or switch from authoring to runtime. The installation docs don't seem to give any information on this either.
How to I install JBPM so that the REST API works?
How do I reconfigure an existing installation so that the REST services work?
thanks, MAtt