Issue Operation or Trying to Administer a Project Results in NullPointerException

Still need help?

The Atlassian Community is here for you.

Ask the community

Symptoms

Trying to create a new issue or modify administer a project results in the following a stacktrace in atlassian-jira.log:

2012-06-16 17:34:55,886 TP-Processor9 ERROR      [500ErrorPage.jsp] Exception caught in 500 page null
java.lang.NullPointerException
	at com.atlassian.jira.issue.fields.IssueTypeSystemField.populateOptionsForProjects(IssueTypeSystemField.java:146)
	at com.atlassian.jira.issue.fields.IssueTypeSystemField.getCreateHtml(IssueTypeSystemField.java:118)
	at com.atlassian.jira.quickedit.rest.api.field.QuickFieldsFactoryImpl.createProjectAndIssueTypeFields(QuickFieldsFactoryImpl.java:188)
	at com.atlassian.jira.quickedit.rest.api.field.QuickFieldsFactoryImpl.getCreateFields(QuickFieldsFactoryImpl.java:57)
	at com.atlassian.jira.quickedit.action.QuickCreateIssue.doDefault(QuickCreateIssue.java:178)
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
	at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)

OR

java.lang.NullPointerException
at com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManagerImpl.getIssueTypesForConfigScheme(IssueTypeSchemeManagerImpl.java:292)
at com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManagerImpl.getSubTaskIssueTypesForProject(IssueTypeSchemeManagerImpl.java:286)
at sun.reflect.GeneratedMethodAccessor2292.invoke(Unknown Source)


Trying to move issues results in the following a stacktrace in atlassian-jira.log:

2014-07-18 12:16:42,059 catalina-ssl-exec-558 ERROR admin 736x2315550x13 1vp48y6 10.111.96.134 /secure/MoveIssue.jspa [jira.plugin.actions.Move
Ext] Exception: com.atlassian.jira.util.dbc.Assertions$NullArgumentException: config should not be null!
com.atlassian.jira.util.dbc.Assertions$NullArgumentException: config should not be null!
at com.atlassian.jira.util.dbc.Assertions.notNull(Assertions.java:28)
at com.atlassian.jira.issue.fields.option.CachedOptionSetManager.getOptionsForConfig(CachedOptionSetManager.java:50)
at com.atlassian.jira.issue.fields.IssueTypeSystemField.getOptionsForConfig(IssueTypeSystemField.java:633)
at com.atlassian.jira.issue.fields.IssueTypeSystemField.getOptionsForConfig(IssueTypeSystemField.java:628)
at com.atlassian.jira.issue.fields.IssueTypeSystemField.getOptionsForIssue(IssueTypeSystemField.java:623)
at com.atlassian.jira.issue.fields.IssueTypeSystemField.validateParams(IssueTypeSystemField.java:378)
at com.atlassian.jira.web.action.issue.MoveIssue.doValidation(MoveIssue.java:171)
at webwork.action.ActionSupport.validate(ActionSupport.java:391)
at webwork.action.ActionSupport.execute(ActionSupport.java:162)
at com.atlassian.jira.action.JiraActionSupport.execute(JiraActionSupport.java:82)
at webwork.interceptor.DefaultInterceptorChain.proceed(DefaultInterceptorChain.java:39)
at webwork.interceptor.NestedInterceptorChain.proceed(NestedInterceptorChain.java:31)

Cause

JIRA's Default Issue Type Scheme has somehow become corrupted in the database. The root cause for this is still unknown.

Diagnosis and Resolution

Run all the suggested SQL Checks and Resolutions in order to solve the problem.

Check 1:

select * from fieldconfiguration where id in (select id from fieldconfigscheme where configname='Default Issue Type Scheme') and fieldid = 'issuetype';

This should always return 1 row meaning that there is a "Default Issue Type Scheme" and "Default Configuration for Issue Type" with the same id.

If this returns no rows, additional modifications must be done to the database than the ones mentioned on this documentation.

Resolution 1:

Contact Support as this documentation does not apply and the fix requires personalised assistance.
Do not continue with additional checks.

Check 2:

select * from configurationcontext where customfield = 'issuetype' and project is null and fieldconfigscheme = (select id from fieldconfigscheme where configname='Default Issue Type Scheme');

If it returns no rows, then this article is applicable as it indicates the default association is not present.

Resolution 2:  

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

insert into configurationcontext values ((select max(id)+1 from configurationcontext),NULL,NULL,'issuetype',(select id from fieldconfigscheme where configname='Default Issue Type Scheme'));

Continue with Check 3

Check 3:

select * from fieldconfigschemeissuetype where id = 10100 or fieldconfigscheme in (select id from fieldconfiguration where id in (select id from fieldconfigscheme where configname='Default Issue Type Scheme'));

If this returns no rows, then this article is applicable as it indicates there is no link between the "Default Issue Type Scheme" and "Default Configuration for Issue Type".

Resolution 3:

Always back up your data before performing any modification to the database. If possible, try your modifications on a test server.

insert into fieldconfigschemeissuetype values (10100,null,(select id from fieldconfiguration where id in (select id from fieldconfigscheme where configname='Default Issue Type Scheme') and fieldid = 'issuetype'),(select id from fieldconfiguration where id in (select id from fieldconfigscheme where configname='Default Issue Type Scheme') and fieldid = 'issuetype'));

JIRA must be restarted for caches to be recreated with the modified data.



Last modified on May 24, 2018

Was this helpful?

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