Jira throws java.lang.NumberFormatException: null when creating Issue type scheme.

Still need help?

The Atlassian Community is here for you.

Ask the community

Problem

When trying to create a new issue type scheme or editing an existing one, the box with the available issue types don't appear in the right side, therefore, there's nothing to drag and drop in the scheme.

Jira throws the error below when clicking on the "add" issue type scheme button:

2018-03-01 13:38:33,560 http-nio-8080-exec-3 ERROR user 818x253x1 instance 192.168.10.0 /secure/admin/ConfigureOptionSchemes!default.jspa [webwork.util.ValueStack] query="/allowEditOptions" {[id="null" type="5" values=""]} {[id="allowEditOptions" type="8" values=""]}
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor527.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at webwork.util.InjectionUtils$DefaultInjectionImpl.invoke(InjectionUtils.java:70)
at webwork.util.InjectionUtils.invoke(InjectionUtils.java:56)
at webwork.util.ValueStack.findValue(ValueStack.java:417)
at webwork.util.SimpleTest.test(SimpleTest.java:408)
at webwork.util.ValueStack.test(ValueStack.java:157)
at webwork.view.taglib.IfTag.doStartTag(IfTag.java:40)
at jsp.secure.admin.views.issuetypes.configoptionset_jsp._jspx_meth_ww_005fif_005f8(configoptionset_jsp.java:2399)
at jsp.secure.admin.views.issuetypes.configoptionset_jsp._jspx_meth_page_005fapplyDecorator_005f0(configoptionset_jsp.java:1286)
at jsp.secure.admin.views.issuetypes.configoptionset_jsp._jspService(configoptionset_jsp.java:206)
at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 48 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 45 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 20 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 12 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 11 filtered
at javax.servlet.http.HttpServlet.service(HttpServlet.java:729)
... 48 filtered
at com.atlassian.greenhopper.jira.filters.ClassicBoardRouter.doFilter(ClassicBoardRouter.java:62)
... 12 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 62 filtered
at com.atlassian.jira.security.JiraSecurityFilter.lambda$doFilter$0(JiraSecurityFilter.java:66)
... 1 filtered
at com.atlassian.jira.security.JiraSecurityFilter.doFilter(JiraSecurityFilter.java:64)
... 36 filtered
at com.atlassian.jira.servermetrics.CorrelationIdPopulatorFilter.doFilter(CorrelationIdPopulatorFilter.java:30)
... 10 filtered
at com.atlassian.web.servlet.plugin.request.RedirectInterceptingFilter.doFilter(RedirectInterceptingFilter.java:21)
... 4 filtered
at com.atlassian.web.servlet.plugin.LocationCleanerFilter.doFilter(LocationCleanerFilter.java:36)
... 26 filtered
at com.atlassian.jira.servermetrics.MetricsCollectorFilter.doFilter(MetricsCollectorFilter.java:25)
... 23 filtered
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.NumberFormatException: null
at java.lang.Long.parseLong(Long.java:552)
at java.lang.Long.parseLong(Long.java:631)
at com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManagerImpl.getDefaultIssueTypeSchemeId(IssueTypeSchemeManagerImpl.java:118)
at com.atlassian.jira.issue.fields.config.manager.IssueTypeSchemeManagerImpl.getDefaultIssueTypeScheme(IssueTypeSchemeManagerImpl.java:103)
at com.atlassian.jira.web.action.admin.issuetypes.ConfigureIssueTypeOptionScheme.isAllowEditOptions(ConfigureIssueTypeOptionScheme.java:119)

The added issue type scheme screen should look like the image below:

Diagnosis

Check the atlassian-jira.log for the error above.
Run the following query on the database to confirm the problem:

select * from propertyentry where property_key = 'jira.scheme.default.issue.type'

If there are no results, then the issue should be the same as this and you'll need to manually insert it into the DB.

Cause

#1 Missing jira.scheme.default.issue.type property.

#2 Default Issue Type Scheme was deleted.

Workaround

#1 For Missing jira.scheme.default.issue.type property

  1. Stop Jira
  2. Run the query below to get the current maximum id +1

    select max(id)+1 from propertyentry;
  3. insert this line to the DB replacing the first value below with the result from the previous step

    insert into propertyentry values (117779,'jira.properties',1,'jira.scheme.default.issue.type',5);
  4. Run the query below to get the id for the default issue type scheme

    select * from FieldConfigScheme where fieldid = 'issuetype' and configname = 'Default Issue Type Scheme'
  5. insert the following line to the DB replacing the second value below with the result from the previous step and the first value from step 2

    insert into propertystring values (117779,'10017');
  6. Start JIRA

#2 For Default Issue Type Scheme being deleted

Either restore the deleted default issue type scheme from a backup or point the projects that were using it to another issue type scheme as the new default.

Last modified on Jul 20, 2021

Was this helpful?

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