'SelectIssueTypeSchemeForProject.doExecute' Error when Assigning an Issue Type Scheme to a Project Fails Due to Invalid Project Data

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

When associating an issue type scheme to a project, a NullPointerException is thrown in log:


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

Unable to render {include} The included page could not be found.
  1. Shut down JIRA.
  2. Run the below SQL queries in JIRA database to remove the association with the deleted project:
    
    -- <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);
    
  3. Restart JIRA
  4. Re-index 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:

  1. Shut down JIRA.
  2. Run the below SQL queries in JIRA database to remove the association with the deleted project:
    
    insert into configurationcontext values (10000, null, null, 'issuetype', 10000);
    
  3. Restart JIRA
  4. Re-index JIRA

Please note these steps assume you have not removed the JIRA default issue type scheme.

Last modified on Mar 30, 2016

Was this helpful?

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