How to fix No FieldLayoutScheme found for id XXXXX during deployment

How to fix No FieldLayoutScheme found for id XXXXX during deployment

 Problem

From time to time, Jira's fieldlayoutschemeentity table has abandoned references from a field configuration to a field configuration scheme.

Caused by: com.atlassian.jira.exception.DataAccessException: No FieldLayoutScheme found for id 11301 at com.atlassian.jira.issue.fields.layout.field.DefaultFieldLayoutManager$ConfigurationSchemeCacheLoader.load(DefaultFieldLayoutManager.java:834)

From the log entries above, there is a problem with an association between a Field Configuration and a Field Configuration Scheme.

 Solution

Perform an integrity check on the target instance:

If the issue persists after executing an integrity check, run the following database query on the target instance to delete the missing references.

DELETE FROM fieldlayoutschemeentity WHERE scheme NOT IN (SELECT id FROM fieldlayoutscheme);

DELETE statements are to be used at your own risk.

Take a database dump before deleting rows from your database.

 Related articles