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

0 vote
Timothy Chin Community Champion May 26, 2015

What is your payload?

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

0 vote
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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Published Sunday in Agility

You asked for it, so we delivered: images on issues have arrived

A picture tells a thousand words. And agility boards have just released their latest feature: cover images on issues – so now your board can tell a story at first glance. Upload attachmen...

172 views 1 10
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