Edit or Update Issue results in a NullPointerException

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

  1. Performing an issue action results in this appearing at the top of the browser page:

    Exception occurred: java.lang.NullPointerException	

    atlassian-jira.log に次のエラーが返される。

    2012-03-06 12:56:17,948 http-8081-7 ERROR admin 776x191136x1 1p91xei 192.168.199.185 /secure/EditIssue.jspa [web.action.issue.EditIssue] Exception occurred editing issue: java.lang.NullPointerException
    java.lang.NullPointerException
    at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType.getChangelogString(MultiSelectCFType.java:259)
    at com.atlassian.jira.issue.fields.CustomFieldImpl.getChangelogString(CustomFieldImpl.java:357)
    at com.atlassian.jira.issue.fields.CustomFieldImpl.updateValue(CustomFieldImpl.java:413)
    at com.atlassian.jira.issue.fields.CustomFieldImpl.updateValue(CustomFieldImpl.java:362)
    at com.atlassian.jira.issue.managers.DefaultIssueManager.updateFieldValues(DefaultIssueManager.java:633)
  2. Trying to move issue from one issue type to another or changing the issue type scheme for a project causing the same stack trace in atlassian-jira.log

診断

  • JIRA was at one point upgraded to JIRA 4.4+ from an older version.
  • You can run the following SQL query to verify if there are any Multi-Select Type field which still have the stringvalue to be other than ID
select * from customfieldvalue where customfield in (select id from customfield where customfieldtypekey like '%multiselect%') order by stringvalue desc;

 

原因

As of JIRA 4.4, the way JIRA stores Select and Multi-Select Type fields was changed, as in our Plugin Developer Notes for JIRA 4.4 documentation which quoted:

We now store the ID (as opposed to the literal value) of the custom field option in the customfieldvalue table.

As a result, a conversion process was implemented during an upgrade from old data.  In cases where the conversion would fail, JIRA would still check the legacy data.  When this occurs, there is data in both the new and the old customfield value storage format.

 

回避策

Access an affected issue and click Edit > Update. JIRA will show the NPE error, but will also fix the issue. This of course, means that each affected issue must be checked.

ソリューション

If the above workaround does not help, then you will need identify the problematic custom field and open a ticket with Atlassian Support. Unfortunately there are isn't a known "fix all" solution yet, but support may be able to help get your instance into a better state.

関連コンテンツ

JRA-25034 - 課題詳細を取得中... ステータス

JRA-26670 - 課題詳細を取得中... ステータス

 

最終更新日 2018 年 11 月 2 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.