Error Retrieving Issues under the 'Component' Category in the 'Browse Project' Menu
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs 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
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:
1
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 making any database modifications. If possible, test any alter, insert, update, or delete SQL commands on a staging server first.
Retrieve the invalid component id from the
atlassian-jira.log
(10061 in the above example).Run the following SQL statement to remove the invalid component id:
1 2 3
delete from nodeassociation where source_node_entity = 'Issue' AND sink_node_entity = 'Component' and sink_node_id='<invalid component id from jira logs>';
Alternative Workaround
Always back up your data before making any database modifications. 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:
We can find all impacted components with:
1
select count(*) from nodeassociation where SINK_NODE_ENTITY='Component' and SINK_NODE_ID not in (Select ID from component);
We can then use the following SQL statement to delete them all at once:
1
delete from nodeassociation where source_node_entity = 'Issue' and sink_node_entity = 'Component' and sink_node_id not in (select id from component);
Resolution
Track JRA-15750 for a permanent resolution to this issue.
Was this helpful?