Filtering users in the User Management page returns an error in Jira Data Center

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

When filtering users from the page /secure/admin/user/UserBrowser.jspa (⚙ > User Management > Users), a null pointer exception is thrown in the UI.

Diagnosis

  • The issue occurs on a clustered Jira Data Center instance (not on a single node Jira instance)

  • The following stack trace is found in the Jira application logs:

    1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 2020-09-15 20:17:34,004+0300 http-nio-8080-exec-12 ERROR username 1217x192x1 7wvs5d x.x.x.x /secure/admin/user/UserBrowser.jspa [c.a.j.w.a.admin.user.UserBrowser] Exception getting users: java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.web.bean.UserBrowserFilter.lambda$getUserNamesFilteredByCriteria$0(UserBrowserFilter.java:173) at java.util.stream.ReferencePipeline$2$1.accept(ReferencePipeline.java:174) at java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:193) at java.util.ArrayList$ArrayListSpliterator.tryAdvance(ArrayList.java:1359) at java.util.stream.StreamSpliterators$WrappingSpliterator.lambda$initPartialTraversalState$0(StreamSpliterators.java:294) at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.fillBuffer(StreamSpliterators.java:206) at java.util.stream.StreamSpliterators$AbstractWrappingSpliterator.doAdvance(StreamSpliterators.java:169) at java.util.stream.StreamSpliterators$WrappingSpliterator.tryAdvance(StreamSpliterators.java:300) at java.util.Spliterators$1Adapter.hasNext(Spliterators.java:681) at com.google.common.collect.TransformedIterator.hasNext(TransformedIterator.java:42) at com.google.common.collect.Iterators.addAll(Iterators.java:357) at com.google.common.collect.Lists.newArrayList(Lists.java:147) at com.google.common.collect.Lists.newArrayList(Lists.java:133) at com.atlassian.jira.web.bean.UserBrowserFilter.getFilteredUsers(UserBrowserFilter.java:137) at com.atlassian.jira.web.action.admin.user.UserBrowser.getBrowsableItems(UserBrowser.java:170) at com.atlassian.jira.web.action.admin.user.UserBrowser.doExecute(UserBrowser.java:122) ... 1 filtered at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:63) ... 7 filtered at javax.servlet.http.HttpServlet.service(HttpServlet.java:741) ... 4 filtered at com.enhancera.auditor.common.filter.WebEventsFilter.doFilter(WebEventsFilter.java:105) ... 27 filtered at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62) ... 7 filtered at com.atlassian.jira.plugin.mobile.web.filter.MobileAppRequestFilter.doFilter(MobileAppRequestFilter.java:37) ... 4 filtered at com.atlassian.jira.plugin.mobile.login.MobileLoginSuccessFilter.doFilter(MobileLoginSuccessFilter.java:54) ... 3 filtered at com.atlassian.diagnostics.internal.platform.monitor.http.HttpRequestMonitoringFilter.doFilter(HttpRequestMonitoringFilter.java:55) ... 8 filtered

Cause

The error is thrown due to corrupted data in the user data cache: the user cache contains references to users which does not exist in the Jira database.

This type of user cache corruption might happen in the case where an XML backup coming from a production Jira Data Center was imported into a test Jira Data Center. In such case, the test Jira Data Center will contain the node information from the production Jira cluster, and might incorrectly overwrite the user cache in the production Jira Data Center.

Solution

  • Schedule a downtime window outside of business hours, to prevent any impact on your operations

  • Shutdown all the Jira nodes together from the Data Center cluster

  • Startup each Jira node one by one

  • The restart of all the Jira nodes shouldclear the user data cache and resolve this issue

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.