Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Getting an java.lang.IllegalArgumentException with authenticated HTTP Feed Custom Field

David Grierson
Contributor
January 13, 2016

Trying to use the JSON HTTP Feed custom field to retrieve a list of the components associated with a project.

Doing this by accessing the JIRA REST API http://JIRAROOT/rest/api/2/project/KEY/components using the JSON HTTP Feed.

Access to the project is restricted though so I have configured the authentication credentials for the custom field.

I getting the following error when I attempt to load the form though:

Illegal character(s) in message header value: Basic <REDACTED>=

(where <REDACTED> is the base64 encoded username/password)

In the atlassian-jira.log file the following stack trace appears:

2016-01-13 11:55:44,419 http-bio-8080-exec-167 ERROR dgr02 715x36102x1 1u1yexc 10.99.80.37 /secure/QuickCreateIssue!default.jspa [atlas.plugins.requestedfiedls.JsonHttpRunner] JsonHttpRunner::getData - error renderring
java.lang.IllegalArgumentException: Illegal character(s) in message header value: Basic &lt;REDACTED&gt;=
        at sun.net.www.protocol.http.HttpURLConnection.checkMessageHeader(HttpURLConnection.java:482)
        at sun.net.www.protocol.http.HttpURLConnection.isExternalMessageHeaderAllowed(HttpURLConnection.java:434)
        at sun.net.www.protocol.http.HttpURLConnection.setRequestProperty(HttpURLConnection.java:2753)
        at ru.andreymarkelov.atlas.plugins.requestedfiedls.util.HttpSender.call(HttpSender.java:71)
        at ru.andreymarkelov.atlas.plugins.requestedfiedls.JsonHttpRunner.getData(JsonHttpRunner.java:31)  &lt;+3&gt; (NativeMethodAccessorImpl.java:57) (DelegatingMethodAccessorImpl.java:43)
... etc ...

When I use a telnet client and issue an appropriate GET of the JIRA REST API URL (above) using the appropriate authorization it successfully retrieves the JSON with the right format.

$ telnet JIRAHOST 8080
Trying 10.107.163.235...
Connected to JIRAHOST.
Escape character is '^]'.
GET http://JIRAHOST:8080/rest/api/2/project/KEY/components HTTP/1.1
Authorization: Basic &lt;REDACTED&gt;=
Host: JIRAHOST.bskyb.com:8080

HTTP/1.1 200 OK
Server: Apache-Coyote/1.1
X-AREQUESTID: 816x36855x1
X-ASEN: SEN-L6132044
Set-Cookie: JSESSIONID=7CEABEBE6FF435E1CDC444955BCBE55F; Path=/; HttpOnly
X-Seraph-LoginReason: OK
Set-Cookie: atlassian.xsrf.token=BQ2Y-CZUN-AKUZ-OK1T|9a83b825ce0754230afd504759f9b763efae1009|lin; Path=/
X-ASESSIONID: 1ir3cfp
X-AUSERNAME: &lt;REDACTED&gt;
Cache-Control: no-cache, no-store, no-transform
X-Content-Type-Options: nosniff
Content-Type: application/json;charset=UTF-8
Content-Length: 711
Date: Wed, 13 Jan 2016 13:36:09 GMT
[{"self":"http://JIRAHOST:8080/rest/api/2/component/13241","id":"13241","name":"component1","assigneeType":"PROJECT_DEFAULT","realAssigneeType":"PROJECT_DEFAULT","isAssigneeTypeValid":false,"project":"KEY","projectId":12462},{"self":"http://JIRAHOST:8080/rest/api/2/component/13240","id":"13240","name":"component2","assigneeType":"PROJECT_DEFAULT","realAssigneeType":"PROJECT_DEFAULT","isAssigneeTypeValid":false,"project":"KEY","projectId":12462},{"self":"http://JIRAHOST:8080/rest/api/2/component/13242","id":"13242","name":"component3","assigneeType":"PROJECT_DEFAULT","realAssigneeType":"PROJECT_DEFAULT","isAssigneeTypeValid":false,"project":"KEY","projectId":12462}]

This suggests that there's something wrong with the way in which the plugin is handling authenticated JSON GET requests.

Any suggestions?

Thanks.

2 answers

0 votes
Oksana Kurysheva
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 24, 2016

Any news on this topic?

Andrey Markelov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
August 21, 2017

Fixed

mertas
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 22, 2018

Hi Andrey, is this problem fixed for the Jira 7.0 earlier versions?

0 votes
Andrey Markelov
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
March 31, 2016

Hello, I am on this issue. Will fix soon. Thank you.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events