JIRA throws NumberFormatException when adding new issue types

Still need help?

The Atlassian Community is here for you.

Ask the community

Platform notice: Server and Data Center only. This article only applies to Atlassian products on the Server 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

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...

  1. Navigate to Administration > Issues
  2. Click  + Add Issue Type 
  3. Selecting either Standard Issue Type or Sub-Task Issue Type and submit

The following appears in the on screen.

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

    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 performing any modifications to the database. 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
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');

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');
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');
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
Last modified on Mar 30, 2016

Was this helpful?

Yes
No
Provide feedback about this article
Powered by Confluence and Scroll Viewport.