-
Bug
-
Resolution: Fixed
-
Highest
-
7.3.0, 7.2.5, 7.2.6, 7.2.7, 7.2.4
-
7.02
-
44
-
Severity 2 - Major
-
2,684
-
Summary
Jira Issues could not load added Confluence links to page This is a regression of JRA-60872 introduced in 7.2.4.
There are 2 steps for issue links:
- Adding the link, this could be done in many ways and "mentioned in" is one of them
- Adding those issue links is outside the scope of current bug.
- Show added link
- Scope of this bug
Environment
- JIRA 7.2.6
- Confluence 5.10+
Steps to Reproduce
- Create link to Confluence page from JIRA issue
Expected Results
Link is rendered
Actual Results
The below exception is thrown in the jira file:
2017-01-06 12:18:54,474 ajp-nio-8600-exec-512 ERROR admin 738x5030206x3 1jgcvgx 10.1.1.1 /rest/viewIssue/1/remoteIssueLink/render/35092 [c.a.j.p.v.issuelink.rest.RemoteIssueLinkResource] Error occurred while generating final HTML for remote issue link: java.lang.RuntimeException: java.io.IOException: Failed to load Confluence Page from remote server Caused by: java.io.IOException: Failed to load Confluence Page from remote server Caused by: com.atlassian.sal.api.net.ResponseException: Status Code: 200, Status Text: OK, Errors: {}, Error Messages: [java.lang.Exception: java.lang.ClassCastException]
Notes
Happy flow:
- JIRA fires the XML-RPC call: response = getBlogPost(applicationLink, pageId);
- Confluence sends back some reply: Blog content or Error
- JIRA checks the result and checks if this is known error, it expects this:
<Fault 0: 'java.lang.Exception: java.lang.ClassCastException: com.atlassian.confluence.pages.Page cannot be cast to com.atlassian.confluence.pages.BlogPost'>
- If this is expected error, JIRA fires another the XML-RPC call: response = getGenericPage(applicationLink, pageId);
Due to JIT optimisation, Confluence replies with:
<?xml version="1.0"?><methodResponse><fault><value><struct><member><name>faultString</name><value>java.lang.Exception: java.lang.ClassCastException</value></member><member><name>faultCode</name><value><int>0</int></value></member></struct></value></fault></methodResponse>
Note the difference:
- java.lang.Exception: java.lang.ClassCastException
- java.lang.Exception: java.lang.ClassCastException: com.atlassian.confluence.pages.Page cannot be cast to com.atlassian.confluence.pages.BlogPost
And that causes link failed to render.
Related to CONF-45760
Workaround
The problem on the Confluence side is caused due to JVM does JIT optimisation and suppresses stack-trace for frequent errors.
- Restart of the Confluence temporary solves the problem.
- Disable JIT optimization in Confluence, add to JVM paramerts:
-XX:-OmitStackTraceInFastThrow
Update 2017-02-20: A bugfix is being delivered in the next patch versions of JIRA. Until those are released, you can use one of the attached versions of the Confluence Link plugin. Read this comment from the development team for more details.
- is a regression of
-
JRASERVER-60872 Issue link feature in JIRA does not load Confluence blog post
- Closed
- is caused by
-
CONFSERVER-45760 Confluence getBlogEntry does not always return the full exception message
- Closed
- is incorporated by
-
JRASERVER-63964 Use Confluence's REST API to retrieve Confluence page link data
- Closed
-
JRASERVER-63965 Use Confluence's REST API to search for page content
- Closed
- is related to
-
JRASERVER-61128 JIRA should use REST API to search Confluence pages and Link Jira Issues
- Gathering Impact
- is duplicated by
-
JCE-818 Loading...
- mentioned in
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...
-
Page Loading...