Error 500 when opening an Issue in Jira
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
When attempting to view issues in Jira, it results in error code 500: java. lang-NumberFormatException: For input string: "10101 "
Diagnosis
The following error message appears in atlassian-jira.log :
1
2
3
4
5
6
7
8
9
10
11
12
13
14
2023-07-18 11:14:25,861+0200 http-nio-8081-exec-17 ERROR admin 674x4094992x1 xxxxxxx 0:0:0:0:0:0:0:1 /browse/XYZ-1234 [c.a.j.web.servlet.InternalServerErrorServlet] {errorId=1d70f453-b332-4a6b-bb44-2286167ad2f1, interpretedMsg=, cause=java.lang.NumberFormatException: For input string: "10101 ", stacktrace=java.lang.NumberFormatException: For input string: "10101 "
at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) [?:1.8.0_211]
at java.lang.Long.parseLong(Long.java:589) [?:1.8.0_211]
at java.lang.Long.<init>(Long.java:965) [?:1.8.0_211]
at com.atlassian.jira.notification.type.ProjectRoleSecurityAndNotificationType.getProjectRoleActors(ProjectRoleSecurityAndNotificationType.java:184) [classes/:?]
at com.atlassian.jira.notification.type.ProjectRoleSecurityAndNotificationType.hasPermission(ProjectRoleSecurityAndNotificationType.java:138) [classes/:?]
at com.atlassian.jira.notification.type.ProjectRoleSecurityAndNotificationType.hasPermission(ProjectRoleSecurityAndNotificationType.java:144) [classes/:?]
at com.atlassian.jira.permission.DefaultWorkflowPermission.allows(DefaultWorkflowPermission.java:44) [classes/:?]
at com.atlassian.jira.security.WorkflowBasedPermissionManager.workflowPermissionCheck(WorkflowBasedPermissionManager.java:220) [classes/:?]
at com.atlassian.jira.security.WorkflowBasedPermissionManager.workflowPermissionCheck(WorkflowBasedPermissionManager.java:184) [classes/:?]
at com.atlassian.jira.security.WorkflowBasedPermissionManager.workflowPermissionCheck(WorkflowBasedPermissionManager.java:141) [classes/:?]
at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:87) [classes/:?]
at com.atlassian.jira.security.DefaultPermissionManager.hasPermission(DefaultPermissionManager.java:111) [classes/:?]
at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:80) [classes/:?]
There are some other errors in the logs that can be seen in the same scenario :
1
java.lang.NumberFormatException: For input string: "true"
OR
1
java.lang.NumberFormatException: For input string: "Administrators"
Cause
A workflow property is corrupt or may contain junk characters.
However, in this case, the property in the step ends with 0xa0 character (nbsp), i.e. a trailing space at the end "10101 ".
1
2
3
4
<step id=""7"" name=""Done"">
<meta name=""jira.permission.comment.projectrole.1"">10101 </meta>
<meta name=""jira.status.id"">10107</meta>
</step>
Solution
Remove the property from the workflow step and recreate it with the same property but without the character at the end. The changes can be done in the workflow by following the below steps :
Go toAdministration>Issues.
In the left panel, selectWorkflows.
For a workflow where you want to edit a property, selectEdit.
Select a status or transition you want to edit a property for.
In the menu, selectProperties.
You’ll be brought to a page where you see the property key and property value
Delete the property and recreate it
Please refer below document for setting a workflow property :
If you are unable to find the corrupted workflow property, one way to search it is via creating the XML backup of the instance and trying to search the id 10101 in the entities.xml file in order to find the problematic value.
Was this helpful?