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

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

This widget could not be displayed.

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

This widget could not be displayed.

Any news on this topic?

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

Suggest an answer

Log in or Sign up to answer
Community showcase
Published Aug 22, 2018 in Marketplace Apps

How a Marketplace app tech team is achieving gender diversity

Hello! My name is Genevieve Blanch, and I'm the Marketing Manager at RefinedWiki, creators of apps to give teams the tools to customize Atlassian platforms. Currently, 44% of the tech team at Re...

528 views 3 19
Read article

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you