JIRA throws NumberFormatException when adding new issue types

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

This article only applies to the Atlassian server platform. Learn more about the differences between cloud and server.

問題

When trying to create new issue types - Standard or Sub-Task, an error is thrown in the web-browser.

次のアクションを行ってログを確認する。

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

診断

診断ステップ

  • Run the following SQL command to see if it returns back empty

    select id from propertyentry where property_key = 'jira.avatar.issuetype.default.id'

原因

The error is caused by an empty jira.avatar.issuetype.default.id in the database

回避策

データベースの変更を行う場合は必ず事前にバックアップを取得してください。

  • 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
最終更新日 2016 年 3 月 30 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.