NullPointerException Error Thrown While Trying to Create Sub-Task

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

Summary

Symptoms

User is not able to create sub-task and the following error thrown in the web UI:

(Auto-migrated image: description temporarily unavailable)

While the following error appears in the atlassian-jira.log:

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20   2013-05-27 14:57:09,953 http-bio-443-exec-2 ERROR jgskuggedal 897x37335x1 knynav 10.69.1.57 /secure/QuickCreateIssue.jspa [jira.quickedit.action.QuickCreateIssue] java.lang.NullPointerException java.lang.NullPointerException at com.atlassian.jira.config.DefaultSubTaskManager.createSubTaskIssueLink(DefaultSubTaskManager.java:533) at com.atlassian.jira.config.DefaultSubTaskManager.createSubTaskIssueLink(DefaultSubTaskManager.java:539) 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.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181) at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211) at $Proxy158.createSubTaskIssueLink(Unknown Source) <+3> (NativeMethodAccessorImpl.java:39) (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 $Proxy158.createSubTaskIssueLink(Unknown Source) <+3> (NativeMethodAccessorImpl.java:39) (DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at com.atlassian.plugin.osgi.bridge.external.HostComponentFactoryBean$DynamicServiceInvocationHandler.invoke(HostComponentFactoryBean.java:154) at $Proxy158.createSubTaskIssueLink(Unknown Source) at com.atlassian.jira.quickedit.action.QuickCreateIssue.doExecute(QuickCreateIssue.java:240) <+1> (ActionSupport.java:165)  

Diagnosis

  1. Users can't create sub-task for all projects.

  2. Running the following SQL query results to empty row.

    1 SELECT * FROM issuelinktype WHERE pstyle="jira_subtask";

Cause

The sub-task issue link is missing from the issuelinktype table in the database. Possibly caused by some integrity issues with the database.

Solution

Resolution

The resolution is to make a direct changes to the database. Therefore, we strongly recommend to create a database backup and XML backup before performing the changes. Any direct modification to the database is highly risky and is best to try in a Test/Staging environment initially.

  • Run the following SQL query to ensure that the ID is not being used (it should return empty), if it return results, please use a different ID in the next query.

1 SELECT * FROM issuelinktype WHERE ID=10000;
  • Run the following INSERT command to fix the issue

1 INSERT INTO issuelinktype values (10000, 'jira_subtask_link', 'jira_subtask_inward', 'jira_subtask_outward', 'jira_subtask');

ℹ️ The first value (which in this case 10000) is the ID

Updated on April 8, 2025

Still need help?

The Atlassian Community is here for you.