Indexing fails due to NullPointerException

Still need help?

The Atlassian Community is here for you.

Ask the community

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:

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:

    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.

 

Last modified on May 31, 2017

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.