Issue searching fails with "NumberFormatException: null" error

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server and Data Center platforms.

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

Problem

Issue searching is not functioning and it throws the following stack trace instead:

java.lang.NumberFormatException: null
    at java.lang.Integer.parseInt(Integer.java:454)
    at java.lang.Integer.valueOf(Integer.java:582)
    at com.atlassian.jira.plugin.issuenav.service.issuetable.AbstractIssueTableCreator.getStableSearchResultsLimit(AbstractIssueTableCreator.java:373)
    at com.atlassian.jira.plugin.issuenav.service.issuetable.AbstractIssueTableCreator.collectIssues(AbstractIssueTableCreator.java:156)
    at com.atlassian.jira.plugin.issuenav.service.issuetable.AbstractIssueTableCreator.executeNormalSearch(AbstractIssueTableCreator.java:227)
    at com.atlassian.jira.plugin.issuenav.service.issuetable.AbstractIssueTableCreator.create(AbstractIssueTableCreator.java:190)

Diagnosis

One of these files has been modified from the default and does not contain the jira.search.stable.max.results parameter:

  • jira-application.properties
  • jpm.xml

Cause

The jira.search.stable.max.results property is not set for the application. 

Jira cannot find the Stable Search Limit parameter inside the jpm.xml while performing a search request. Hence throwing the NullPointerException error instead.

Resolution

A default value is set in jpm.xml for this property and this file should not normally be modified. Instead, add overrides of default properties in the jira-application.properties file as described at Advanced Jira application configuration.

Solution 1

  1. Restore the original content of jpm.xml file by downloading a zip or tarball of the same version you have installed and extracting the file from it.
  2. Restart JIRA and perform re-index

Solution 2

Add this property to the jira-application.properties file.

  1. If not already present, create a new file named jira-config.properties under your $JIRA-HOME directory
  2. Copy and paste the following inside jira-config.properties

     jira.search.stable.max.results=1000
  3. Restart Jira and perform re-index

Full details are available at Advanced Jira application configuration.


Description

Issue searching is not functioning and it throws the following stack trace: java.lang.NumberFormatException: null at java.lang.Integer.parseInt(Integer.java:454)



Last modified on Aug 16, 2018

Was this helpful?

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