Hi,
MY code was working code with jira api 3.0.0.version. Now same code i m trying to pull the BUG. below is the code where it gives the error.
JiraRestClient jiraRestClient = factory.create(jiraUriValue, new BasicHttpAuthenticationHandler(jiraCredentials, jiraSecureCredentials));
SearchResult searchResult = jiraRestClient.getSearchClient().searchJql(jiraQuery, maxCount, startCount, set).claim();"
from the Jira is giving the error as,
Exception in thread "main" RestClientException{statusCode=Optional.of(404), errorCollections=[]}
at com.atlassian.jira.rest.client.internal.async.DelegatingPromise.claim(DelegatingPromise.java:45)
at jiratest.MyJiraClient.createIssue(MyJiraClient.java:59)
at jiratest.MyJiraClient.main(MyJiraClient.java:36)
Caused by: RestClientException{statusCode=Optional.of(404), errorCollections=[]}
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:178)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:170)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:49)
at com.atlassian.httpclient.api.ResponsePromiseMapFunction.apply(ResponsePromiseMapFunction.java:10)
at io.atlassian.util.concurrent.Promises$OfStage.lambda$fold$4(Promises.java:332)
at io.atlassian.util.concurrent.Promises.lambda$biFunction$7(Promises.java:422)
at java.util.concurrent.CompletableFuture.uniHandle(CompletableFuture.java:836)
at java.util.concurrent.CompletableFuture$UniHandle.tryFire(CompletableFuture.java:811)
at java.util.concurrent.CompletableFuture.postComplete(CompletableFuture.java:488)
at java.util.concurrent.CompletableFuture.complete(CompletableFuture.java:1975)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$1.lambda$doCompleted$0(SettableFuturePromiseHttpPromiseAsyncClient.java:37)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient.runInContext(SettableFuturePromiseHttpPromiseAsyncClient.java:61)
at com.atlassian.httpclient.apache.httpcomponents.SettableFuturePromiseHttpPromiseAsyncClient$ThreadLocalDelegateRunnable.run(SettableFuturePromiseHttpPromiseAsyncClient.java:129)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at java.lang.Thread.run(Thread.java:750)
Caused by: 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've found a dead link. - JIRA</title><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'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">
<ul class="atlassian-footer">
<li>
Atlassian JIRA <a class="seo-link" href="https://www.atlassian.com/software/jira">Project Management Software</a>
<span id="footer-build-information">(v1001.0.0-SNAPSHOT#100190-<span title='4ce3a7c490fca7ca76d8e555916c96f04872b008' data-commit-id='4ce3a7c490fca7ca76d8e555916c96f04872b008}'>sha1:4ce3a7c</span>)</span>
</li>
<li>
<a id="about-link" href="/secure/AboutPage.jspa">About JIRA</a>
</li>
<li>
<a id="footer-report-problem-link" href="/secure/CreateIssue!default.jspa">Report a problem</a>
</li>
</ul>
<div id="footer-logo"><a href="http://www.atlassian.com/" rel="nofollow">Atlassian</a></div></section></footer><!-- #footer --></div><!-- #page --></body></html>
at org.codehaus.jettison.json.JSONTokener.syntaxError(JSONTokener.java:439)
at org.codehaus.jettison.json.JSONObject.<init>(JSONObject.java:169)
at org.codehaus.jettison.json.JSONObject.<init>(JSONObject.java:266)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient.extractErrors(AbstractAsynchronousRestClient.java:212)
at com.atlassian.jira.rest.client.internal.async.AbstractAsynchronousRestClient$2.apply(AbstractAsynchronousRestClient.java:175)
... 15 more
I tried upgrading the version of jira core api to 5.2.2. but still it gives the same error.
Can anyone help me out in this.
this gives error when i tries to final String issueKey = myJiraClient.createIssue("JIRAFEATUR", 1L, "Issue created from JRJC");
or run getIssue() any method to get or pull the information giving this error.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.