Error Retrieving Issues under the 'Component' Category in the 'Browse Project' Menu

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

There are few components shown under the project and each component will show the total number of open issues. However, when clicking on the particular component which has certain number of open issues, nothing appears in the issue navigator. The following error will be displayed in the logs:

2008-06-04 15:07:26,499 TP-Processor3 ERROR [jira.issue.statistics.ComponentStatisticsMapper] Indexes may be corrupt - unable to retrieve component with id '10061'.

Cause

There is an invalid component associated with the issues.

Workaround

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

  1. Retrieve the invalid component id from the atlassian-jira.log (10061 in the above example).
  2. Run the following SQL statement to remove the invalid component id:

    delete from nodeassociation where source_node_entity = 'Issue'
    AND sink_node_entity = 'Component'
    and sink_node_id='<invalid component id from jira logs>';
    
  3. Re-index JIRA

Alternative Workaround

Always back up your data before performing any modifications to the database. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.

In the case of a large number of orphaned rows, it may not be realistic to delete each one manually and the workaround from JRASERVER-15750 can be used:

  1. We can find all impacted components with:

    select count(*) from nodeassociation where SINK_NODE_ENTITY='Component' and SINK_NODE_ID not in (Select ID from component);
  2. We can then use the following SQL statement to delete them all at once:

    delete from nodeassociation where source_node_entity = 'Issue' and sink_node_entity = 'Component' and sink_node_id not in (select id from component);


  3. Re-index JIRA

Resolution

Track JRA-15750 for a permanent resolution to this issue.





























Last modified on Jul 6, 2023

Was this helpful?

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