-
Bug
-
Resolution: Fixed
-
Low
-
4.0
-
4
-
Symptom
When creating a JIRA issue, a NullPointException is generated.
The following appears within atlassian-jira.log:
java.lang.NullPointerException at com.atlassian.jira.workflow.SimpleWorkflowManager.isEditable(SimpleWorkflowManager.java:520) at com.atlassian.jira.issue.managers.DefaultIssueManager.isEditable(DefaultIssueManager.java:379) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:70) at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28) at $Proxy38.isEditable(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.hostcomponents.impl.DefaultComponentRegistrar$ContextClassLoaderSettingInvocationHandler.invoke(DefaultComponentRegistrar.java:129) at $Proxy38.isEditable(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:150) at $Proxy38.isEditable(Unknown Source) at com.atlassian.jira.toolkit.customfield.NullCFType.getVelocityParameters(NullCFType.java:51) at com.atlassian.jira.issue.customfields.CustomFieldUtils.buildParams(CustomFieldUtils.java:408) at com.atlassian.jira.plugin.customfield.CustomFieldTypeModuleDescriptor.getEditHtml(CustomFieldTypeModuleDescriptor.java:86) at com.atlassian.jira.issue.fields.CustomFieldImpl.getEditHtml(CustomFieldImpl.java:897) at com.atlassian.jira.issue.fields.CustomFieldImpl.getCreateHtml(CustomFieldImpl.java:883) at com.atlassian.jira.issue.fields.CustomFieldImpl.getCreateHtml(CustomFieldImpl.java:878)
And the below may also be present:
2012-08-18 15:49:27,711 http-8080-9 ERROR [500ErrorPage.jsp] Exception caught in 500 page null java.lang.NullPointerException at com.atlassian.jira.workflow.OSWorkflowManager.isEditable(OSWorkflowManager.java:1077) at com.atlassian.jira.issue.managers.DefaultIssueManager.isEditable(DefaultIssueManager.java:464) at sun.reflect.GeneratedMethodAccessor563.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source)
Cause
The SimpleWorkflowManager.isEditable or OSWorkflowManager.isEditable methods can throw a NPE when called with an issue without a status. The most common way for this to occur is for a custom field to call this method on the 'Create Issue' screen (i.e. before the issue is associated with a workflow).
For example, the supporttools (i.e. NullCFType) field from the JIRA Toolkit plugin does this.
Workaround
- Delete the Support Tools Bar custom field under Administration > Custom Fields.
- Disable the Support Tool Bar (supporttools) module under Administration > Plugins > JIRA Toolkit Plugin > expand the modules enabled section.