'SelectIssueTypeSchemeForProject.doExecute' Error when Assigning an Issue Type Scheme to a Project Fails Due to Invalid Project Data
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
When associating an issue type scheme to a project, a NullPointerException is thrown in log:
1
2
3
4
5
6
7
java.lang.NullPointerException
at java.util.ArrayList.<init>(ArrayList.java:131)
at org.apache.commons.collections.CollectionUtils.subtract(CollectionUtils.java:180)
at com.atlassian.jira.web.action.admin.issuetypes.pro.SelectIssueTypeSchemeForProject.doExecute(SelectIssueTypeSchemeForProject.java:167)
at webwork.action.ActionSupport.execute(ActionSupport.java:153)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:54)
...
Cause
The exception is thrown if there are any project(s) associated with that issue type scheme that do not exist in the in the JIRA instance. This problem can be caused if a project is not deleted completely due to a database connection failure.
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.
Shut down JIRA.
Run the below SQL queries in JIRA database to remove the association with the deleted project:
1 2 3 4
-- <issue type scheme name> should be replaced by the real issue type scheme name being used. delete from configurationcontext where fieldconfigscheme in (select id from fieldconfigscheme where fieldid='issuetype' and configname = '<issue type scheme name>') and project not in (select id from project);
Restart JIRA
If this continues to occur with every single newly created project, this could mean that the defaults are incorrectly set - causing all new projects to be created without an issue type scheme. In this scenario you will need to repair the defaults first before creating any new projects. This can be done with the following steps:
Shut down JIRA.
Run the below SQL queries in JIRA database to remove the association with the deleted project:
1
insert into configurationcontext values (10000, null, null, 'issuetype', 10000);
Restart JIRA
Please note these steps assume you have not removed the JIRA default issue type scheme.
Was this helpful?