Indexing fails due to 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

This problem is related to a third party plugin, and therefore not supported by Atlassian. See Atlassian Supported Plugins for more information.

Symptoms

Reindexing fails due to a NullPointerException, due to the JIRA Enhancer Plugin. The following error appears in the logs:

1 2 3 4 5 6 7 8 9 10 11 12 java.util.concurrent.ExecutionException: java.lang.NullPointerException com.atlassian.jira.issue.index.DefaultIndexManager$RuntimeExecutionException: java.util.concurrent.ExecutionException: java.lang.NullPointerException at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:248) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy76.reIndexAll(Unknown Source) at com.atlassian.jira.util.index.IndexLifecycleManager$Composite.reIndexAll(IndexLifecycleManager.java:113) at com.atlassian.jira.upgrade.tasks.AbstractReindexUpgradeTask.doUpgrade(AbstractReindexUpgradeTask.java:44)

Cause

Some custom field records are corrupted or wrongly generated by 3rd party plugin in the database, containing empty (null) values in optional value columns.

Resolution

  1. Back up JIRA data.

  2. Run the following SQL in JIRA database:

    1 delete from customfieldvalue where stringvalue is null and numbervalue is null and textvalue is null and datevalue is null and parentkey is null;
  3. Re-index JIRA.

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.