Editing Default Users to Project Role shows error
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
Problem
Editing Default Users to Project Role shows the following error in JIRA:
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
34
35
FILL IN LOGAn error occurred whilst rendering this message. Please contact the
administrators, and inform them of this bug. Details: -------
org.apache.velocity.exception.MethodInvocationException: Invocation of
method 'getUserPickerHtml' in class
com.atlassian.jira.web.action.admin.roles.UserRoleActorAction threw
exception java.lang.NullPointerException at
com.atlassian.jira.plugin.system.projectroleactors:atlassian-user-role-actor-action//templates/plugins/jira/projectroles/user-role-actor.vm[line 21, column 9]
at
org.apache.velocity.runtime.parser.node.ASTIdentifier.execute(ASTIdentifier.java:223)
at
org.apache.velocity.runtime.parser.node.ASTReference.execute(ASTReference.java:262)
at
org.apache.velocity.runtime.parser.node.ASTReference.render(ASTReference.java:342)
at
org.apache.velocity.runtime.parser.node.SimpleNode.render(SimpleNode.java:336)
at org.apache.velocity.Template.merge(Template.java:328) at
org.apache.velocity.Template.merge(Template.java:235) at
org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
at
com.atlassian.velocity.DefaultVelocityManager.writeEncodedBodyImpl(DefaultVelocityManager.java:117)
at
com.atlassian.velocity.DefaultVelocityManager.writeEncodedBody(DefaultVelocityManager.java:97)
at
com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.toWriterImpl(DefaultVelocityTemplatingEngine.java:146)
at
com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEngine.java:134)
at
com.atlassian.jira.web.dispatcher.JiraVelocityViewDispatcher.dispatch(JiraVelocityViewDispatcher.java:50)
at
com.atlassian.jira.web.dispatcher.JiraWebworkViewDispatcher.dispatchViaVelocityView(JiraWebworkViewDispatcher.java:110)
at
com.atlassian.jira.web.dispatcher.JiraWebworkViewDispatcher.dispatchView(JiraWebworkViewDispatcher.java:69)
at
com.atlassian.jira.web.dispatcher.JiraWebworkActionDispatcher.service(JiraWebworkActionDispatcher.java:204)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:728) at
Diagnosis
Checking from JIRA will show that some of the users exist in the Roles page but when searching from the "Users page", some of the users do not exist.
Run the following query to find users who exist in app_user table but not in cwd_user table:
1
select roletypeparameter from projectroleactor where roletype = 'atlassian-user-role-actor' and roletypeparameter not in (select user_key from app_user);
Cause
This issue can happen if JIRA have NULL values from pid column in projectroleactor table. Since some of the ID data is missing from database, JIRA is not able to retrieve users
Solution
Resolution
Stop JIRA.
Search for the related NULL pid in the projectroleactor table by using the SQL query below:
1 2
SELECT id, pid, (select name from projectrole where id = projectroleid), roletypeparameter FROM projectroleactor WHERE pid IS NULL;
Take note the project role and username. Remove the entries from the returned results by using SQL below:
1
DELETE FROM projectroleactor where pid IS NULL
Restart JIRA.
Manually edit the members through JIRA UI to add users to the project role.
Was this helpful?