Getting org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to post request

452 views
Skip to first unread message

coltn...@gmail.com

unread,
Mar 2, 2016, 11:13:12 AM3/2/16
to jBPM Usage
Hi All,

I am using JBPM client jar version 6.2.0 Final to start the JBPM process using java. 

I do something like
                        RuntimeEngine engine = null;
        KieSession ksession = null;
System.out.println(
"url=" + url + " username=" + username + " password=" + password + " deploymentId=" + deploymentId);
try {
engine = RemoteRuntimeEngineFactory.newRestBuilder().addTimeout(REST_TIMEOUT_SECS).addUrl(new URL(url)).addUserName(username)
.addPassword(password).addDeploymentId(deploymentId).build();
ksession = engine.getKieSession();
for (Integer id : myList) {
// start a new process instance
if (id != null) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("id", id);
ProcessInstance processInstance = ksession.startProcess(definitionId, params);
}
}
} catch (Exception e) {
e.printStackTrace();
}

When there is a list of more than 2 then i get the following error

Exception in thread "main" org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to post request: Error occurred when trying to retrieve response code
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:396)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeCommand(AbstractRemoteCommandObject.java:128)
at org.kie.services.client.api.command.KieSessionClientCommandObject.getProcessInstances(KieSessionClientCommandObject.java:290)
at com.colt.novitas.client.JbpmClientCronJob.createConnection(JbpmClientCronJob.java:162)
at com.colt.novitas.client.JbpmClientCronJob.<init>(JbpmClientCronJob.java:69)
at com.colt.novitas.client.JbpmClientCronJob.main(JbpmClientCronJob.java:42)
Caused by: org.kie.remote.common.rest.KieRemoteHttpRequestException: Error occurred when trying to retrieve response code
at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemoteHttpRequest.java:1307)
at org.kie.remote.common.rest.KieRemoteHttpRequest.post(KieRemoteHttpRequest.java:719)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:392)
... 5 more
Caused by: java.net.SocketTimeoutException: Read timed out
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at java.io.BufferedInputStream.fill(BufferedInputStream.java:235)
at java.io.BufferedInputStream.read1(BufferedInputStream.java:275)
at java.io.BufferedInputStream.read(BufferedInputStream.java:334)
at sun.net.www.http.HttpClient.parseHTTPHeader(HttpClient.java:689)
at sun.net.www.http.HttpClient.parseHTTP(HttpClient.java:633)
at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLConnection.java:1324)
at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:468)
at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemoteHttpRequest.java:1305)

Can you please advice on this? Also Is this Start Process Asynchronous?

Regards,
Nasir 

Tom Cai

unread,
Aug 29, 2016, 4:13:40 AM8/29/16
to jBPM Usage
are you fix this bug in drools 6.3 or 6.4?  can you give me some idea?

在 2016年3月3日星期四 UTC+8上午12:13:12,coltn...@gmail.com写道:
Reply all
Reply to author
Forward
0 new messages