Project gadget throws internal server error

Still need help?

The Atlassian Community is here for you.

Ask the community

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 Nov 8, 2018

Was this helpful?

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