Project gadget throws internal server error

Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.

Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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

Symptoms

The Projects gadget on dashboard shows the following error:

And the error below appears in the application server log files:

com.sun.jersey.server.impl.application.WebApplicationImpl onException
SEVERE: Internal server error
com.atlassian.jira.exception.DataAccessException: Error occurred while retrieving user with id 'akhan'.
    at com.atlassian.jira.project.ProjectImpl.getUser(ProjectImpl.java:154)
    at com.atlassian.jira.project.ProjectImpl.getLead(ProjectImpl.java:58)
    at com.atlassian.jira.gadgets.system.ProjectGadgetResource.getProjectDataNoPermissionCheck(ProjectGadgetResource.java:383)
    at com.atlassian.jira.gadgets.system.ProjectGadgetResource.generate(ProjectGadgetResource.java:283)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)

Cause

The project which the gadget was configured for has a lead which was already deleted from the users table, causing an invalid reference. Trying to delete the lead for the project through the user interface will not work as well.

Resolution

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

It is necessary to change the the entry lead on the project table, to match a valid user on your system.

  1. Backup your JIRA database.

  2. Shutdown JIRA.

  3. Run the query below to identify which user is set as the lead for the project (you will need to replace the project name on it):

    SELECT lead FROM project WHERE pname = 'PROJECT NAME GOES HERE';
    
  4. Replace the returned row with an active user on JIRA which has the necessary permissions on the project.
Last modified on Mar 14, 2025

Was this helpful?

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