JIRA throws NumberFormatException when adding new issue types
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
Problem
When trying to create new issue types - Standard or Sub-Task, an error is thrown in the web-browser.
When making the following actions...
Navigate to Administration > Issues
Click + Add Issue Type
Selecting either Standard Issue Type or Sub-Task Issue Type and submit
The following appears in the on screen.
1
2
3
4
5
6
7
8
Referer URL: https://<server-name>/secure/admin/ViewIssueTypes.jspa
java.lang.NumberFormatException: null
java.lang.NumberFormatException: null
at java.lang.Long.parseLong(Long.java:404)
at java.lang.Long.parseLong(Long.java:483)
at com.atlassian.jira.config.DefaultIssueTypeService.createIssueTypeOrSubTaskType(DefaultIssueTypeService.java:357)
at com.atlassian.jira.config.DefaultIssueTypeService.createIssueType(DefaultIssueTypeService.java:174)
at com.atlassian.jira.web.action.admin.issuetypes.ViewIssueTypes.doAddIssueType(ViewIssueTypes.java:117) ...
Diagnosis
Diagnostic Steps
Run the following SQL command to see if it returns back empty
1
select id from propertyentry where property_key = 'jira.avatar.issuetype.default.id'
Cause
The error is caused by an empty jira.avatar.issuetype.default.id in the database
Workaround
Always back up your data before making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Please stop the JIRA Server
Run the following SQL queries
1
2
3
4
5
6
7
insert into propertyentry
(id, entity_name, entity_id, property_key, propertytype)
select
4, 'jira.properties', 1, 'jira.avatar.issuetype.default.id', 5
where not exists
(select id from propertyentry where property_key = 'jira.avatar.issuetype.default.id');
1
2
3
4
5
6
7
insert into propertystring
(id, propertyvalue)
select
(select id from propertyentry where property_key = 'jira.avatar.issuetype.default.id' limit 1), '10300'
where not exists
(select id from propertyentry pe inner join propertystring ps using (id)
where pe.property_key = 'jira.avatar.issuetype.default.id');
1
2
3
4
5
6
insert into propertyentry
(id, entity_name, entity_id, property_key, propertytype)
select
2, 'jira.properties', 1, 'jira.avatar.issuetype.subtask.default.id', 5
where not exists
(select id from propertyentry where property_key = 'jira.avatar.issuetype.subtask.default.id');
1
2
3
4
5
6
7
insert into propertystring
(id, propertyvalue)
select
(select id from propertyentry where property_key = 'jira.avatar.issuetype.subtask.default.id' limit 1), '10316'
where not exists
(select id from propertyentry pe inner join propertystring ps using (id)
where pe.property_key = 'jira.avatar.issuetype.subtask.default.id');
Restart your JIRA Server
Was this helpful?