Fixing Broken 'Projects' Drop-Down due to 'avatarId should not be null!' Error

Still need help?

The Atlassian Community is here for you.

Ask the community


#1 - When clicking on the "Projects" link in JIRA, the drop-down menu does not appear. Instead, the user is redirected to the last project. The only way the user can browse to find all projects is to navigate to the "Administration" link.

#2 - This error might also broke the navigation under Administration > Projects. 

An error similar to the following appears in the logs:

SEVERE: Internal server error
com.atlassian.jira.util.dbc.Assertions$NullArgumentException: avatarId should not be null!
	at com.atlassian.jira.util.dbc.Assertions.notNull(
	at com.atlassian.jira.avatar.AvatarManagerImpl.getById(
	at com.atlassian.jira.project.ProjectImpl.getAvatar(
	at com.atlassian.jira.gadgets.system.ProjectGadgetResource.getProjectDataNoPermissionCheck(
	at com.atlassian.jira.gadgets.system.ProjectGadgetResource.generate(
	at sun.reflect.GeneratedMethodAccessor722.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(
	at java.lang.reflect.Method.invoke(
	at com.sun.jersey.server.impl.model.method.dispatch.AbstractResourceMethodDispatchProvider$ResponseOutInvoker._dispatch(
	at com.sun.jersey.server.impl.model.method.dispatch.ResourceJavaMethodDispatcher.dispatch(
	at com.sun.jersey.server.impl.uri.rules.HttpMethodRule.accept(
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(
	at com.sun.jersey.server.impl.uri.rules.ResourceClassRule.accept(
	at com.sun.jersey.server.impl.uri.rules.RightHandPathRule.accept(
	at com.sun.jersey.server.impl.uri.rules.RootResourceClassesRule.accept(
	at com.sun.jersey.server.impl.application.WebApplicationImpl._handleRequest(
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(
	at com.sun.jersey.server.impl.application.WebApplicationImpl.handleRequest(
	at com.sun.jersey.spi.container.servlet.WebComponent.service(
	at com.sun.jersey.spi.container.servlet.ServletContainer.service(
	at com.sun.jersey.spi.container.servlet.ServletContainer.doFilter(


One or more JIRA projects are missing the "avatar" setting, which is supposed to be required in JIRA projects.

The following SQL script can be run against JIRA's database to check whether there are any projects missing this setting:

select * from project where avatar is null;

The root cause of missing avatar may relate to a known JIRA 4.1.* bug: JRA-21564.


For Symptom #1

Please follow the below steps to fix the problem:

  • Go to Administration > Projects
  • Click Edit link in Operations column for the project
  • In Edit Project page, select a valid avatar for that project
  • Check if you can bypass this problem

For Symptom #2

As you can not access the Projects view you will need to fix the null avatar on the project directly on the database.

 Please make sure you have a backup prior running any change directly on the database. If possible test the procedure in a lower environment first.

  1. First, get an existing avatar id from another project and check the project "Test project No Hours" id by running:

    SELECT * FROM project;
  2. Stop Jira
  3. Update the avatar with the following query:
    UPDATE project SET avatar='<avatar_id>' WHERE id='<project_id>'; 
  4. Start Jira - check if you can access Projects now.

Last modified on Jan 3, 2023

Was this helpful?

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