"Unable to add char sequence to request body" when using the remote API to start a BPM Suite 6.1 process in Windows
Issue
We are trying to start a process using the remote REST API and send a file content as a process parameter using the following code:
RemoteRestRuntimeEngineFactory restEngineFactory = RemoteRuntimeEngineFactory
.newRestBuilder().addDeploymentId(deployment).addUrl(url)
.addUserName(username).addPassword(password).addTimeout(10000).buildFactory();
KieSession session = restEngineFactory.newRuntimeEngine().getKieSession();
session.startProcess(process, parameters);
However it is failing with the error below. What could be wrong?
org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to post request: Unable to add char sequence to request body
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:401)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeCommand(AbstractRemoteCommandObject.java:128)
at org.kie.services.client.api.command.KieSessionClientCommandObject.startProcess(KieSessionClientCommandObject.java:257)
at com.redhat.consulting.process.RESTProcessStarter.startProcess(RESTProcessStarter.java:103)
at com.redhat.consulting.process.RESTProcessStarter.main(RESTProcessStarter.java:84)
Caused by: org.kie.remote.common.rest.KieRemoteHttpRequestException: Unable to add char sequence to request body
at org.kie.remote.common.rest.KieRemoteHttpRequest.initializeConnection(KieRemoteHttpRequest.java:914)
at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemoteHttpRequest.java:1302)
at org.kie.remote.common.rest.KieRemoteHttpRequest.post(KieRemoteHttpRequest.java:719)
at org.kie.services.client.api.command.AbstractRemoteCommandObject.executeRestCommand(AbstractRemoteCommandObject.java:397)
... 4 more
Caused by: java.io.IOException: too many bytes written
at sun.net.www.protocol.http.HttpURLConnection$StreamingOutputStream.write(HttpURLConnection.java:3192)
at java.io.BufferedOutputStream.write(BufferedOutputStream.java:122)
at org.kie.remote.common.rest.KieRemoteHttpRequest$RequestOutputStream.write(KieRemoteHttpRequest.java:425)
at org.kie.remote.common.rest.KieRemoteHttpRequest.initializeConnection(KieRemoteHttpRequest.java:912)
... 7 more
Environment
- Red Hat JBoss BPM Suite (BPM Suite)
- 6.1
- Windows Operating System
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.
Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.
