NullPointerException when Trying to Access the User Browser

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

Symptoms

When viewing the "User Browser" in the administration section of JIRA, an error page with the following stack trace appears:

1 2 3 4 5 6 7 8 9 10 11 12 13 java.lang.RuntimeException: java.lang.NullPointerException at com.atlassian.jira.web.action.admin.user.UserBrowser.getBrowsableItems(UserBrowser.java:105) at com.atlassian.jira.web.action.admin.user.UserBrowser.doExecute(UserBrowser.java:55) at webwork.action.ActionSupport.execute(ActionSupport.java:153) at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:59) ... Caused by: java.lang.NullPointerException at java.util.concurrent.ConcurrentHashMap.putIfAbsent(ConcurrentHashMap.java:896) at com.opensymphony.user.provider.ofbiz.OFBizAbstractProvider.findUser(OFBizAbstractProvider.java:187) at com.opensymphony.user.provider.ofbiz.OFBizCredentialsProvider.handles(OFBizCredentialsProvider.java:144) at com.opensymphony.user.provider.ldap.LDAPCredentialsProvider.handles(LDAPCredentialsProvider.java:269) at com.opensymphony.user.UserManager.getProvider(UserManager.java:269) ... 105 more

Cause

A null user exists in the userbase table, external_entities table, or the XML backup.

Diagnosis

XML Backup

<OSUser id="10015" passwordHash="..."/>

OR

<OSMembership id="10015" groupName="jira-users"/>

Database

For versions > 4.3

One of the following queries should return the problematic null user entries:

1 select * from cwd_user where user_name is null;
1 select * from app_user where lower_user_name is null;
1 select * from app_user where user_key is null;
1 select * from cwd_group where lower_group_name is null;
1 select * from cwd_group where group_name is null;
1 select * from cwd_membership where membership_type='GROUP_USER' and child_name not in (select user_name from cwd_user);

For versions < 4.3

One of the following queries should return the problematic null user entries:

1 select * from userbase where username is null
1 select * from external_entities where NAME is null
1 select * from groupbase where groupname is null
1 select * from membershipbase where USER_NAME not in (select username from userbase);

Resolution

The null user offending records must be removed from the database. This includes the record in the userbase or external_entities tables, and any membershipbase records that relate to this user. There are two options:

  1. A SQL-database delete or update command to delete the offending user record.

    OR

  2. A manual update/deleting of the offending user record from the XML backup file followed by a reimporting of the updated XML.

Updated on April 2, 2025

Still need help?

The Atlassian Community is here for you.