Uploaded image for project: 'Confluence Data Center'
  1. Confluence Data Center
  2. CONFSERVER-32265

Unable to retrieve all JIRA metadata on JIRA links pop-up

    XMLWordPrintable

Details

    Description

      When establishing a trusted application link with a JIRA (tested with different 6.1.x versions), when viewing a page which contain links to JIRA issues, clicking on the JIRA links button, the links are displayed but you receive the following warning on the screen:

      Unable to retrieve all JIRA metadata. Error retrieving JIRA metadata. Please check the logs for errors

      The following stack trace appears in the logs:

      2014-01-17 13:02:33,729 ERROR [http-6540-4] [jira.service.helper.JiraMetadataErrorHelper] logError Error retrieving JIRA metadata. Please check the logs for errors
       -- url: /rest/jira-metadata/1.0/metadata | userName: alex | referer: http://aconde01:6540/display/~alex/badsfasdf+asdf+asdf+asdf+adsf
      com.atlassian.confluence.plugins.metadata.jira.exception.JiraMetadataException: java.lang.NullPointerException
              at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper.handleException(SingleAppLinkMetadataHelper.java:159)
              at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper.access$600(SingleAppLinkMetadataHelper.java:30)
              at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$1.call(SingleAppLinkMetadataHelper.java:109)
              at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$1.call(SingleAppLinkMetadataHelper.java:90)
              at java.util.concurrent.FutureTask$Sync.innerRun(Unknown Source)
              at java.util.concurrent.FutureTask.run(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
              at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
              at java.lang.Thread.run(Unknown Source)
      Caused by: java.lang.NullPointerException
              at com.atlassian.confluence.plugins.metadata.jira.service.helper.JiraEpicPropertiesHelper.getEpicProperties(JiraEpicPropertiesHelper.java:52)
              at com.atlassian.confluence.plugins.metadata.jira.service.helper.SingleAppLinkMetadataHelper$1.call(SingleAppLinkMetadataHelper.java:98)
              ... 6 more
      

      No error appears on JIRA logs.

      The problem comes from the REST call <CONFLUENCE_URL>/rest/jira-metadata/1.0/metadata?pageId=1736714&_=1389961101786.

      The response to that rest call is:

      {"count":1,"groups":[{"type":"VERSIONS","items":[],"links":[]},{"type":"SPRINTS","items":[],"links":[]},{"type":"EPICS","items":[],"links":[]},{"type":"ISSUES","items":[{"name":"TPA-1","status":"To Do","description":"Test Issue 1","url":"http://aconde01:5611/browse/TPA-1"}],"links":[]}],"unauthorisedAppLinks":[],"errors":[{"type":"WARNING","errorMessage":"Error retrieving JIRA metadata. Please check the logs for errors"}]}}

      This makes me think it is related to authentication, but other information and features which come from that application link work without apparent problems.

      Repro Steps:

      1. Create an application link between JIRA and Confluence. Make sure trusted authentication is enabled.
      2. Create a new Confluence page and add a link to a JIRA ticket.
      3. The JIRA Link button will now appear on the top of the created page. Click on it to get the error.

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              aconde Alejandro Conde Carrillo (Inactive)
              Votes:
              19 Vote for this issue
              Watchers:
              18 Start watching this issue

              Dates

                Created:
                Updated: