Bug 1274318 - Remote Java client should provide meaningful unauthorized error message
Summary: Remote Java client should provide meaningful unauthorized error message
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss BPMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.1.0
Hardware: Unspecified
OS: Unspecified
high
medium
Target Milestone: ---
: ---
Assignee: Shelly McGowan
QA Contact: Lukáš Petrovický
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2015-10-22 13:26 UTC by Kris Verlaenen
Modified: 2020-03-27 20:13 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-03-27 20:13:27 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Kris Verlaenen 2015-10-22 13:26:57 UTC
In 6.2, a new rest-all role is required to access the REST remote API (and therefor also the remote Java client through REST).  The remote Java client should give a meaningful error message if the user isn't authorized. In 6.2.0.ER4, it is returning:

org.kie.remote.client.api.exception.RemoteCommunicationException: Unable to retrieve content from response
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.execu
teRestCommand(AbstractRemoteCommandObject.java:425)
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.execu
teCommand(AbstractRemoteCommandObject.java:159)
        at org.kie.services.client.api.command.KieSessionClientCommandObject.sta
rtProcess(KieSessionClientCommandObject.java:276)
        at com.redhat.bpms.examples.mortgage.CreateProcesses.populateSamples(Cre
ateProcesses.java:57)
        at com.redhat.bpms.examples.mortgage.CreateProcesses.main(CreateProcesse
s.java:47)
Caused by: org.kie.remote.common.rest.KieRemoteHttpRequestException: Unable to r
etrieve input stream of response
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseStream(KieRem
oteHttpRequest.java:1378)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseBuffer(KieRem
oteHttpRequest.java:1396)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseBody(KieRemot
eHttpRequest.java:1338)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.access$2100(KieRemote
HttpRequest.java:117)
        at org.kie.remote.common.rest.KieRemoteHttpRequest$5.body(KieRemoteHttpR
equest.java:1304)
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.execu
teRestCommand(AbstractRemoteCommandObject.java:407)
        ... 4 more
Caused by: java.net.HttpRetryException: cannot retry due to server authenticatio
n, in streaming mode
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream0(HttpURLCo
nnection.java:1637)
        at sun.net.www.protocol.http.HttpURLConnection.getInputStream(HttpURLCon
nection.java:1440)
        at java.net.HttpURLConnection.getResponseCode(HttpURLConnection.java:480
)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.responseCode(KieRemot
eHttpRequest.java:1318)
        at org.kie.remote.common.rest.KieRemoteHttpRequest.post(KieRemoteHttpReq
uest.java:719)
        at org.kie.services.client.api.command.AbstractRemoteCommandObject.execu
teRestCommand(AbstractRemoteCommandObject.java:362)
        ... 4 more


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