Edit or Update Issue results in a NullPointerException

Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.

Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.

*Except Fisheye and Crucible

Summary

Symptoms

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

    1 Exception occurred: java.lang.NullPointerException

    The following appears in the atlassian-jira.log:

    1 2 3 4 5 6 7 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

Diagnosis

  • 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

1 select * from customfieldvalue where customfield in (select id from customfield where customfieldtypekey like '%multiselect%') order by stringvalue desc;

Cause

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.

Workaround

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.

Solution

Resolution

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.

Related Content

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.