Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Java Rest Client hanging on createIssue request forever? Edited

val issueInput = IssueInputBuilder()
.build()"About to send jira createIssue request $description") // Log 1
val basicIssuePromise = issueClient.createIssue(issueInput)"create Issue request sent, waiting for promise. Promise = $basicIssuePromise") // Log 2

val bi = basicIssuePromise.claim()"Claim worked and got the issue response = $bi") // Log 3

return bi


This is the code that causes problems. In the service, I am only seeing Log 1 get printed as output, and no exception is thrown. This leads me to think that the `createIssue` method is hanging, or killing the thread.

This started happening kind of suddenly, it seemed to work fine for several hundred tickets, but now does not work.

Any insight into why this is happening would be appreciated. Thanks!





1 answer

1 accepted

0 votes
Answer accepted

Hello @Brandon Xia ,

Welcome to the Atlassian Community!

I am not sure what Java Rest Client you are using and I don't know much about the implementation details (e.g. authentication method used, etc) since this information has not been provided so far.

However, in order to determine whether the issue is with the REST API endpoint or with your code you can send the same request to the Create issue REST API endpoint using Curl and see if this works or if it hangs as well. 

Something like the following example (assuming you use API Tokens to authenticate):

curl -u <EMAIL-ADDRESS>:<API-TOKEN> -D- -H 'Accept: application/json' -H 'Content-Type: application/json' --data '{"fields":{"project":{"key":"<PROJECT-KEY>"},"summary":"create issue","issuetype":{"name":"Task","subtask":false},"priority":{"name":"Medium"}}}' -X POST "http://<NAME>" 


Please run the same test on your side replacing <EMAIL-ADDRESS>, <API-TOKEN> and <NAME> with the right values and replacing the JSON payload (the one after --data) with the one you send from your Java application.

If this fails as well please paste the console output in your reply (making sure to hide the sensitive data) and let me know date time and timezone you tested this so that I can go check your Jira site logs.





Hi Dario, 

I was using the library: com.atlassian.jira:jira-rest-java-client-app:5.2.2. I was originally on 5.2.0, then I switched to 5.2.2 and the problems persisted.


I was able to make the api request through curl successfully with response 201.

I suspect this isn't an auth problem, as it was working for a few weeks, and stopped suddenly.


I hope this gives you enough info to debug -

The cURL request I just made's response (successful):

HTTP/2 201
server: AtlassianProxy/
cache-control: no-cache, no-store, no-transform
content-type: application/json;charset=UTF-8
strict-transport-security: max-age=315360000; includeSubDomains; preload
date: Fri, 26 Mar 2021 16:33:36 GMT
atl-traceid: 7068a3f245416945
x-arequestid: 99684d2d-0764-4984-a95d-f8e5daf5bbf7
x-aaccountid: 602d93a61bf1ce006bb704d8
x-xss-protection: 1; mode=block
timing-allow-origin: *
x-envoy-upstream-service-time: 831
x-content-type-options: nosniff
micros-issuer: micros/edge-authenticator
set-cookie: atlassian.xsrf.token=xxxxxxxxx Path=/; Secure
expect-ct: report-uri="", enforce, max-age=86400

Here are some timestamps that I know some requests were made but never resolved: (UTC Time)



Thank you,


Hello @Brandon Xia ,

I might not be the best person to answer development related issues, however:

  1. If the call works fine with curl but it fails from your code, the issue is either with the library you are using or with your code. Have you tried comparing the data sent while using curl and the one sent by your code (endpoints, methods, headers, payload, etc)?
  2. If you are actually using the Jira Rest Java Client (JRJC) then please notice that this is not supposed to work with Jira Cloud (Server only):


Finally, for the future, please notice that this is not the best place to get help on development  related questions. The right resources are listed in 




Thanks for the reply. Yes I think it is something wrong with either my code or the library. 

I have decided to just move away from the JRJC Library and use a regular http client to make the requests. It appears to be more stable.


Thanks for the resources too, Dario!


Dario B Atlassian Team Mar 31, 2021

You are very welcome @Brandon Xia ,

I actually had to correct my previous reply, in there I wanted to write that JRJC is built to work with Jira Server only and that's why it might not work with some Jira Cloud REST API endpoints.

Have a nice weekend!


Suggest an answer

Log in or Sign up to answer

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you