Error 500 while accessing Issue Navigator after upgrading JIRA

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

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

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:

    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.

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:

    select * from avatar where filename = 'Avatar-unknown.png';
     
    Please take note of the id
  • Run the following SQL query:

    select * from propertyentry where property_key = 'jira.avatar.user.anonymous.id';
     
    Please take note of the id
  • Run the following SQL query:

    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.

Last modified on Nov 2, 2018

Was this helpful?

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