Received java.lang.NumberFormatException when viewing issue history tab
症状
atlassian-jira.log
に次のメッセージが表示される。
2014-10-22 09:49:51,745 http-bio-xxx-exec-4 ERROR xxx xxxx xxx xxxx /browse/CAPA-106 [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NumberFormatException: For input string: "null"
java.lang.NumberFormatException: For input string: "null"
at java.lang.NumberFormatException.forInputString(Unknown Source)
at java.lang.Long.parseLong(Unknown Source)
at java.lang.Long.<init>(Unknown Source)
at com.atlassian.jira.issue.tabpanels.ChangeHistoryAction.getPrettyDuration(ChangeHistoryAction.java:222)
at sun.reflect.GeneratedMethodAccessor7444.invoke(Unknown Source) <+1>
at java.lang.reflect.Method.invoke(Unknown Source)
診断
Search for the Null value in change history table.
select * from changeitem where groupid in (select ID from changegroup where issueid in (select ID from jiraissue where project = (select ID from project where pkey = '<PROJECT_KEY>') and issuenum = '<ISSUE_NUMBER>'));
原因
There are few 'Null' value in change history table.
回避策
For JIRA 6.x and above
- Backup JIRA.
- Jira をシャットダウンします。
Run the SQL command below:
update changeitem set newvalue='<ANY_VALUE>' , newstring='<ANY_VALUE>' where groupid in (select ID from changegroup where issueid in (select ID from jiraissue where project = (select ID from project where pkey = '<PROJECT_KEY>') and issuenum = '<ISSUE_NUMBER>')) and newvalue = 'null';
- Jira を起動します。
- Run Integrity Checker to fix any errors returned (if no errors should be fine).
Last modified on Mar 30, 2016
Powered by Confluence and Scroll Viewport.