Editing default members in project roles throws a null pointer exception
Platform Notice: Cloud and Data Center - This article applies equally to both cloud 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
Summary
Problem
We can manage the default roles with which a project is created from Administration - > System - > Project Roles - > Manage default members. While editing the default users, JIRA throws a null pointer exception with the following message

The following appears in the atlassian-jira.log
Userpicker
1
2
3
4
5
2019-05-29 14:50:51,562 http-nio-8080-exec-287 ERROR xxx 890x11852626x1 rered 216.54.34.45,10.251.67.87 /secure/project/UserRoleActorAction.jspa [c.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
java.lang.NullPointerException
at com.atlassian.jira.web.component.multiuserpicker.UserBean.convertUsersToUserBeans(UserBean.java:56)
at com.atlassian.jira.web.component.multiuserpicker.UserPickerWebComponent.getHtml(UserPickerWebComponent.java:35)
at com.atlassian.jira.web.action.admin.roles.UserRoleActorAction.getUserPickerHtml(UserRoleActorAction.java:59)
Diagnosis
Diagnostic Steps
The problem occurs when JIRA tries pick the list of user from the projectroleactor table to display in another UI where the users can be removed or added. Run the following query to identify the list of users in the atlassian-user-role-actor roletype that are not in app_user table.
projectroleactor
1
select distinct roletypeparameter from projectroleactor where projectroleid = '<ID seen in the error page in the address url>' and roletype in ('atlassian-user-role-actor') and roletypeparameter not in (select user_key from app_user);
Cause
When we store the user details in the projectroleactor table, the user_key for the user from the app_user table is added to the roletypeparameter column. This maps to the lower_user_name column value of both the app_user and cwd_user table which stores the user details. For some reason, we noticed from the result of the query that there were entries for the roletypeparameter which cannot be mapped to a user_key. This causes JIRA to throw the error since its not a user_key or lower_user_name column value mapped to the app_user table.
Solution
Resolution
Modify the projectroleactor table to have the roletypeparameter to have users that can be matched to the app_user table in case any unexpected entry gets entered.
Was this helpful?