Error 500 while accessing Issue Navigator after upgrading JIRA
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
Summary
Problem
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
1
2
3
4
5
6
7
8
9
10
11
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
Diagnosis
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:
1 2 3 4 5 6 7 8 9 10 11 12 13 14
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 ----+---------------
Cause
After upgrading JIRA, there's missing data (anonymous users avatar) in propertystring table.
Solution
Resolution
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.
Run the following SQL query:
1 2 3
select * from avatar where filename = 'Avatar-unknown.png'; Please take note of the id
Run the following SQL query:
1 2 3
select * from propertyentry where property_key = 'jira.avatar.user.anonymous.id'; Please take note of the id
Run the following SQL query:
1
insert into propertystring (id, propertyvalue) values (id-from-second-query, id-from-first-query);
Verify whether the avatar information exist in propertystring table:
1
select * from propertystring where id = id-from-second-query;
Restart JIRA and check whether Issue Navigator is accessible.
Was this helpful?