Error 'cannot be cast to com.google.gson.JsonArray' showing in Confluence logs after upgrading to JIRA 7
問題
After upgrading to JIRA 7, the following error appears in the atlassian-confluence.log
:
2015-11-20 10:11:18,412 ERROR [JIRAMetadataPlugin_aggregate:thread-2] [metadata.jira.helper.JiraMetadataErrorHelper] printError The response from one or more JIRA instances cannot be parsed.
– referer: http://confluence.base.url/confluence/dashboard.action | url: /confluence/display/TS/Page+test | userName: admin | action: viewpage | page: 810002
com.atlassian.confluence.plugins.metadata.jira.exception.JiraMetadataException: java.lang.ClassCastException: com.google.gson.JsonObject cannot be cast to com.google.gson.JsonArray
at com.atlassian.confluence.plugins.metadata.jira.aggregate.JiraAggregateProvider.parse(JiraAggregateProvider.java:248)
at com.atlassian.confluence.plugins.metadata.jira.aggregate.JiraAggregateProvider.getDataForSingleApplink(JiraAggregateProvider.java:108)
at com.atlassian.confluence.plugins.metadata.jira.aggregate.JiraAggregateProvider.access$100(JiraAggregateProvider.java:41)
at com.atlassian.confluence.plugins.metadata.jira.aggregate.JiraAggregateProvider$1.call(JiraAggregateProvider.java:92)
at com.atlassian.confluence.plugins.metadata.jira.aggregate.JiraAggregateProvider$1.call(JiraAggregateProvider.java:77)
at java.util.concurrent.FutureTask.run(FutureTask.java:266)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: java.lang.ClassCastException: com.google.gson.JsonObject cannot be cast to com.google.gson.JsonArray
at com.google.gson.JsonObject.getAsJsonArray(JsonObject.java:178)
at com.atlassian.confluence.plugins.metadata.jira.aggregate.JiraAggregateProvider.parse(JiraAggregateProvider.java:223)
... 8 more
原因
The Confluence JIRA Metadata Plugin version installed in the Confluence instance is older than 1.7.14, which is the version compatible with JIRA 7.
ソリューション
To fix it we just need to update the Confluence JIRA Metadata Plugin:
- Go under your Manage add-ons page in Confluence
- Select All add-ons on the dropbox menu
- Write jira in the search filter
- You will find the Confluence JIRA Metadata Plugin with an Update button available. Click on this button and your plugin will be updated to 1.7.14 (or newer), fixing the issue.
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.