JSON Exception while using JRJC

This is my code:


private  static  final  String JIRA_URL  = "";

private  static  final  String JIRA_ADMIN_USERNAME  = "admin";

private  static  final  String JIRA_ADMIN_PASSWORD  = "admin";

 JiraRestClientFactory factory = new  AsynchronousJiraRestClientFactory();

 URI uri = new  URI(JIRA_URL );

JiraRestClient client = factory.createWithBasicHttpAuthentication(uri,


Promise<User> promise = client.getUserClient().getUser(mohan_venkatesan@infosys.com);

User user = promise.claim();

I am getting error as:

Exception in thread "main"

com.atlassian.jira.rest.client.RestClientException : org.codehaus.jettison.json.JSONException : A JSONObject text must begin with '{' at character 1 of <!DOCTYPE html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="X-UA-Compatible" content="IE=edge"><title>Oops, you&#39;ve found a dead link. - JIRA</title><script type="text/javascript">contextPath = "";</script><link type='text/css' rel='stylesheet' href='/static-assets/metal-all.css' media='all'><script src='/static-assets/metal-all.js'></script><!--[if lt IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie.css' media='all'><script src='/static-assets/metal-all-ie.js'></script><![endif]--><!--[if IE 9]><link type='text/css' rel='stylesheet' href='/static-assets/metal-all-ie9.css' media='all'><![endif]--><meta name="decorator" content="none" /></head><body class=" error-page error404"><script type="text/javascript">document.body.className += " js-enabled";</script><div id="page"><header id="header" role="banner"></header><!-- #header --><section id="content" role="main"><div class="aui-page-panel"><div class="aui-page-panel-inner"><section class="aui-page-panel-content lowerContent"><div id="error-state"><span class="error-type"></span><h1>Oops, you&#39;ve found a dead link.</h1><ul><li>Go back to the <a href="javascript:window.history.back()">previous page</a></li><li>Go to the <a href="/secure/MyJiraHome.jspa">Home Page</a></li></ul></div></section><!-- .aui-page-panel-content --></div><!-- .aui-page-panel-inner --></div><!-- .aui-page-panel --></section><!-- #content --><footer id="footer" role="contentinfo"><section class="footer-body">


 Pls help me, if you have any solution for this.


Mohan GV

3 answers

This widget could not be displayed.
Timothy Chin Community Champion May 26, 2015

What is your payload?

This widget could not be displayed.

Hi Timothy, I beleive, you are asking about my JIRA licence requirement. I am using the trail version of JIRA. Thx...

This widget could not be displayed.
Timothy Chin Community Champion May 27, 2015

I'm not asking about your JIRA license. I am asking about your payload. What is the content you are sending to JIRA.

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Tuesday in Jira

What modern development practices are at the heart of how your team delivers software?

Hey Community mates! Claire here from the Software Product Marketing team. We all know software development changes rapidly, and it's often tough to keep up. But from our research, we've found the h...

157 views 1 3
Join discussion

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