'getGroups Errant null pointer in OSUGroupManager' Causes Duplicate User Names in the User Manager

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

  1. When an LDAP user logs in or information about an LDAP user is viewed, an "Errant null pointer in OSUGroupManager" is logged. Functionality does not seem to be affected: the login is successful and the user's membership in groups is displayed.

  2. Duplication of user names in User Browser.

The following error appears in the logs:

1 2 3 4 5 6 7 8 9 10 11 12 [user.impl.osuser.OSUGroupManager] getGroups Errant null pointer in OSUGroupManager - url: /admin/users/viewuser.action | userName: admin | action: viewuser java.lang.NullPointerException at com.opensymphony.user.provider.hibernate.HibernateAccessProvider.listGroupsContainingUser(HibernateAccessProvider.java:138) at bucket.user.providers.ChainedAccessProvider.listGroupsContainingUser(ChainedAccessProvider.java:44) at com.atlassian.user.impl.osuser.OSUGroupManager.getGroups(OSUGroupManager.java:210) at com.atlassian.user.impl.delegation.DelegatingGroupManagerTemplate.getGroups(DelegatingGroupManagerTemplate.java:57) at bucket.user.DefaultUserAccessor.getGroups(DefaultUserAccessor.java:448) at sun.reflect.GeneratedMethodAccessor180.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585)

Diagnosis

Check atlassian-user.xml for repositories and ordering. The LDAP should come first and the hibernate tag second:

1 2 <hibernate name="Hibernate Repository" key="hibernateRepository" description="Hibernate Repository" />

There should be no osuser tag:

1 2 <osuser key="osuserRepository" name="OSUser Repository"/>

Cause

The OSUser repository, left uncommented at the top of the atlassian-user.xml file, will take precedence over the LDAP and Hibernate repository and cause triplicate users in the user browser.

Solution

Resolution

Remove the OSUser repository line from atlassian-user.xml.

Updated on April 16, 2025

Still need help?

The Atlassian Community is here for you.