Unable to save a template while using Delegated Project Creator for Jira

Problem statement

In the Project Templates screen, the Name entered is not being saved as expected on clicking the + icon while creating a Project Template.

Error message 

The problem persists inspite of switching the system into safe mode and the following error message is displayed:

batch.js?locale=de-DE:180 Failed to run init function: Cannot read property 'answers' of undefined Æ’ ()

{

wittified.communicator.answers.load('com.wittified.jira.project-creator', AJS.$('.wittified-communicator-question'), '/projecttemplates/1.0');

} TypeError: Cannot read property 'answers' of undefined

at wittifiedCPAdminCreateTemplate!default.jspa:553

at batch.js?locale=de-DE:276 TypeError: Cannot read property 'answers' of undefined

at /secure/wittifiedCPAdminCreateTemplate!default.jspa:553:32

at /s/4a0101a7d7692c649aeb7559f72e668b-CDN/-c7fb5n/802003/6411e0087192541a09d88223fb51a6a0/2215ce00ef54a85f6638f0246e6582bf//download/contextbatch/js/super/batch.js?locale=de-DE:276:488


Log entries 

2019-07-16 14:56:37,718 http-nio-8080-exec-8 WARN username 896x6955x1 optq08 78.35.46.106 /secure/wittifiedCPAdminCreateTemplate!default.jspa [c.atlassian.ozymandias.SafePluginPointAccess] Unable to run plugin code because of 'java.lang.NullPointerException - null'.
2019-07-16 14:56:46,913 http-nio-8080-exec-8 ERROR anonymous 896x6980x1 optq08 78.35.46.106 /rest/projecttemplates/1.0/new-template/template/ [c.a.plugin.servlet.DefaultServletModuleManager] Unable to create new reference LazyLoadedFilterReference{descriptor=tge.cloud:servletFilter (null), filterConfig=ApplicationFilterConfig[name=filter-plugin-dispatcher-after-encoding-request, filterClass=com.atlassian.plugin.servlet.filter.ServletFilterModuleContainerFilter]}
io.atlassian.util.concurrent.LazyReference$InitializationException: io.atlassian.util.concurrent.LazyReference$InitializationException: java.lang.NullPointerException
   at io.atlassian.util.concurrent.LazyReference.getInterruptibly(LazyReference.java:156)
   at io.atlassian.util.concurrent.LazyReference.get(LazyReference.java:116)
   at com.atlassian.plugin.servlet.DefaultServletModuleManager.getInstance(DefaultServletModuleManager.java:430)
   at com.atlassian.plugin.servlet.DefaultServletModuleManager.getFilter(DefaultServletModuleManager.java:423)
   at com.atlassian.plugin.servlet.DefaultServletModuleManager.getFilters(DefaultServletModuleManager.java:288)
   ... 20 filtered
2019-07-16 14:56:46,917 http-nio-8080-exec-8 ERROR username 896x6980x1 optq08 78.35.46.106 /rest/projecttemplates/1.0/new-template/template/ [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.NullPointerException
   at net.java.ao.EntityManager.create(EntityManager.java:375)

Environment

ApplicationJira
VersionJira Software 8.2.3
App Version3.0
Database TypeMySql

Cause

In a scenario where the sql_mode does not accept any value other than zero, user cannot create templates.

Solution

  1. Log into the respective database server as a root user.
  2. Go to the file: /etc/my.cnf to edit it.
  3. Update the my.cnf file by commenting out the following parameter sql_mode = NO_AUTO_VALUE_ON_ZERO.
    Please note that # is used to comment.

  • If you still face the same issue and the my.cnf file changes are not reflected, restart the Jira instance once.
  • Test this scenario on a non-production environment before implementing on the production environment.