Browsing for users at the User Management page throws a NullPointerException
Symptoms
When accessing the User Management session on Jira and browsing for users, Jira will return a 500 response with the following exception:
java.lang.RuntimeException: java.lang.NullPointerException
at com.atlassian.jira.web.action.admin.user.UserBrowser.getBrowsableItems(UserBrowser.java:173) [classes/:?]
at com.atlassian.jira.web.action.admin.user.UserBrowser.doExecute(UserBrowser.java:122) [classes/:?]
Diagnosis
No null entries can be found at the cwd_user table:
select * from cwd_user where user_name is null;
Cause
Jira throws this error after trying to retrieve information from its user cache. When it is inconsistent with the information stored at the database, this error can happen and prevent users from accessing this functionality.
Resolution
Refresh the user cache from Jira using the following curl command, making sure to replace username:password to a valid username/password combination from a Jira administrator, and replacing base.url to the Base URL from your Jira environment:
curl -v -X DELETE -u username:password https://base.url/rest/internal/1.0/cache/app
Alternative Recommended Resolution
API endpoint above has uncertain effects and it is not recommended to be used. You might consider the alternative User Cache reset provided below:
Filtering users in the User Management page returns an error in Jira Data Center