Error 500 while accessing Issue Navigator after upgrading JIRA
プラットフォームについて: Server および Data Center のみ。この記事は、Server および Data Center プラットフォームのアトラシアン製品にのみ適用されます。
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.
*Fisheye および Crucible は除く
問題
After upgrading JIRA, accessing Issue Navigator will result in error 500 and following stack trace will be shown:
The following appears in the atlassian-jira.log
2016-08-15 19:38:49,372 http-nio-8359-exec-3 ERROR admin 1178x88x1 15ydk6c 10.60.3.121 /issues/ [o.a.c.c.C.[.[localhost].[/GHS-51359].[action]] Servlet.service() for servlet action threw exception
java.lang.NumberFormatException: null
at java.lang.Long.parseLong(Long.java:552)
at java.lang.Long.valueOf(Long.java:803)
at com.atlassian.jira.avatar.plugin.JiraUserAvatarProvider.getAnonymousAvatar(JiraUserAvatarProvider.java:285)
at com.atlassian.jira.avatar.plugin.JiraUserAvatarProvider$JiraUserPluginAvatar.<init>(JiraUserAvatarProvider.java:352)
at com.atlassian.jira.avatar.plugin.JiraUserAvatarProvider.getAvatar(JiraUserAvatarProvider.java:155)
at com.atlassian.jira.avatar.pluggable.AvatarProviderAdapter.getAvatar(AvatarProviderAdapter.java:45)
at com.atlassian.jira.avatar.AvatarServiceImpl.getAvatarURLImpl(AvatarServiceImpl.java:209)
at com.atlassian.jira.avatar.AvatarServiceImpl.getAvatarURL(AvatarServiceImpl.java:221)
... 2 filtered
診断
Diagnostic Steps
- This type of error usually happen because of missing data from database. In this case, it's likely that this is related to user avatar and highly likely anonymous user's avatar.
To verify this, run the following 2 SQL queries in JIRA's database:
select * from propertyentry where property_key = 'jira.avatar.user.anonymous.id'; Example result: id | entity_name | entity_id | property_key | propertytype -------+-----------------+-----------+-------------------------------+-------------- 10200 | jira.properties | 1 | jira.avatar.user.anonymous.id | 5 Run the next query: select * from propertystring where id = 10200; If the database produce 0 return as shown below, you are affected by this issue. id | propertyvalue ----+---------------
原因
After upgrading JIRA, there's missing data (anonymous users avatar) in propertystring table.
ソリューション
To resolve this issue, we can map the default avatar for anonymous user from database. The steps for this are:
(!) Backup yourJIRA.
- Stop your JIRA.
次の SQL クエリを実行します。
select * from avatar where filename = 'Avatar-unknown.png'; Please take note of the id
次の SQL クエリを実行します。
select * from propertyentry where property_key = 'jira.avatar.user.anonymous.id'; Please take note of the id
次の SQL クエリを実行します。
insert into propertystring (id, propertyvalue) values (id-from-second-query, id-from-first-query);
Verify whether the avatar information exist in propertystring table:
select * from propertystring where id = id-from-second-query;
Restart JIRA and check whether Issue Navigator is accessible.