Not Able to Create a Business Project after Migrating from Cloud
問題
When creating a Business project, the users are getting the attached screenshot:
The following appears in atlassian-jira.log
2017-03-14 09:40:53,972 http-nio-8080-exec-13 ERROR admin 580x2487x1 xxxxx 111.111.111.11,11.1.1.1 /rest/project-templates/1.0/templates [c.a.jira.project.ProjectCreateRegistrarImpl] The handler with id com.atlassian.jira.project-templates-plugin:apply-project-template-handler threw an exception while handling a notification about a project being created
com.atlassian.cache.CacheException: java.lang.NullPointerException
at com.atlassian.cache.memory.DelegatingCachedReference.get(DelegatingCachedReference.java:83)
at com.atlassian.jira.cache.SingleValueLocalCache$2.get(SingleValueLocalCache.java:71)
at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager.getActiveWorkflowNames(DefaultWorkflowSchemeManager.java:410)
at com.atlassian.jira.workflow.OSWorkflowManager.getSchemeActiveWorkflows(OSWorkflowManager.java:175)
at com.atlassian.jira.workflow.OSWorkflowManager.isActive(OSWorkflowManager.java:165)
at com.atlassian.jira.bc.workflow.DefaultWorkflowService.createDraftWorkflow(DefaultWorkflowService.java:126)
at com.atlassian.jira.bc.workflow.DefaultWorkflowTransitionService.draftOf(DefaultWorkflowTransitionService.java:164)
at com.atlassian.jira.bc.workflow.DefaultWorkflowTransitionService.addPostFunctionToWorkflow(DefaultWorkflowTransitionService.java:82)
... 3 filtered
at java.lang.reflect.Method.invoke(Method.java:498)
at com.atlassian.plugin.util.ContextClassLoaderSettingInvocationHandler.invoke(ContextClassLoaderSettingInvocationHandler.java:26)
at com.sun.proxy.$Proxy393.addPostFunctionToWorkflow(Unknown Source)
...
Caused by: java.lang.NullPointerException
at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager$WorkflowSupplier.get(DefaultWorkflowSchemeManager.java:1092)
at com.atlassian.jira.workflow.DefaultWorkflowSchemeManager$WorkflowSupplier.get(DefaultWorkflowSchemeManager.java:1060)
at com.atlassian.cache.memory.MemoryCacheManager$1$1.load(MemoryCacheManager.java:129)
at com.atlassian.cache.memory.MemoryCacheManager$1$1.load(MemoryCacheManager.java:105)
at com.google.common.cache.LocalCache$LoadingValueReference.loadFuture(LocalCache.java:3527)
診断
- Creating a Software project is fine.
- The Workflows administration page is empty
When running the Integrity Checker, it results to:
Technical details Log's referral number: 0e57dd97-3667-499b-bb38-d53cfc07f380 Cause Referer URL: https://ji01.blade-group.com/secure/admin/IntegrityChecker!default.jspa\\ com.atlassian.jira.appconsistency.integrity.exception.IntegrityException: Error occurred while performing check. com.atlassian.jira.appconsistency.integrity.exception.IntegrityException: Error occurred while performing check. at com.atlassian.jira.appconsistency.integrity.check.WorkflowCurrentStepCheck.doCheck(WorkflowCurrentStepCheck.java:140) [classes/:?] ...
環境
- Customer migrated from Cloud.
原因
There's a non existing workflow associated to an existing workflow scheme. In this case, the non existent workflow was generated by Bamboo Cloud builds which isn't available in server.
ソリューション
- To identify the problematic workflow, run the below SQL:
select * from workflowschemeentity where workflow not in (select workflowname from jiraworkflows);
Remember to backup your instance before directly modifying the database.
2. Once the ID of the problematic workflow has been identified, we need to manually update the Workflow Scheme being used by that workflow to use an existing workflow.
UPDATE workflowschemeentity SET workflow ='default software workflow' where id =xxxxx;
Note: Use the ID returned on the first query.
3. Restart JIRA