java.lang.NullPointerException

Atlassian JIRA | Jamie Echlin [Adaptavist] | 4 years ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

    {panel:title=*This issue has moved*} {color:red}This issue has been moved permanently to [Adaptavist's Product Support JIRA instance|https://productsupport.adaptavist.com/browse/GRV-282].{color} All existing users of this instance should have the same username on our Product Support instance. However, you will very likely need to click on the [Can't access your account|https://productsupport.adaptavist.com/secure/ForgotLoginDetails.jspa] link in order to reset to a new password. {panel}It didn't really ever handle multi-selects, but you could get this problem if you had used this tool then converted a single to a multi select In JIRA 6, if a multi-select is associated with an issue, and that issue has two values selected for the multiselect, then a "reindex all" will fail with the following stack trace: {code} MultiSelectCFType.compare failed for option1: FIRST option2: SECOND java.lang.NullPointerException at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare(MultiSelectCFType.java:100) at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare(MultiSelectCFType.java:94) at java.util.Arrays.mergeSort(Arrays.java:1270) .... millions more {code} This is because there are null values for sequence IDs, which you can see by running: select * from customfieldoption where sequence is null This can be fixed by running this script: https://gist.github.com/jamieechlin/5917773 In Admin -> Script Console, which will order all unordered option values according to their order of creation, which is the order that jira will display them in if no sequence is specified. You may need to run Built-In Scripts -> Clear Caches -> JIRA caches, before attempting to reindex.

    JIRA | 4 years ago | Jamie Echlin
    java.lang.NullPointerException
  2. Speed up your debug routine!

    Automated exception search integrated into your IDE

    Not finding the right solution?
    Take a tour to get the most out of Samebug.

    Tired of useless tips?

    Automated exception search integrated into your IDE

    Root Cause Analysis

    1. java.lang.NullPointerException

      No message provided

      at com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare()
    2. com.atlassian.jira
      MultiSelectCFType$1.compare
      1. com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare(MultiSelectCFType.java:100)
      2. com.atlassian.jira.issue.customfields.impl.MultiSelectCFType$1.compare(MultiSelectCFType.java:94)
      2 frames
    3. Java RT
      Arrays.mergeSort
      1. java.util.Arrays.mergeSort(Arrays.java:1270)
      1 frame