Issue Navigator displays an error when searching for certain issues
症状
When you search the Issue Navigator, you get the message "An error occurred whilst rendering this message. Please contact the administrators, and inform them of this bug."
atlassian-jira.log
に次のメッセージが表示される。
2013-08-03 16:04:13,960 http-apr-8080-exec-5 ERROR admin 964x14x1 xxxxx 192.168.0.1 /issues/ [velocity] Exception in macro #issues at templates/jira/issue/table/issuetable-issue.vm[line 3, column 1]
2013-08-03 16:04:13,961 http-apr-8080-exec-5 ERROR admin 964x14x1 xxxxx 192.168.0.1 /issues/ [com.atlassian.velocity.DefaultVelocityManager] MethodInvocationException occurred getting message body from Velocity: java.lang.NullPointerException
java.lang.NullPointerException
at com.atlassian.jira.permission.PermissionContextImpl.getRelevantStepDescriptor(PermissionContextImpl.java:90)
at com.atlassian.jira.permission.WorkflowPermissionFactory.getWorkflowPermissions(WorkflowPermissionFactory.java:30)
at com.atlassian.jira.security.WorkflowBasedPermissionManager.hasPermission(WorkflowBasedPermissionManager.java:75)
at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:113)
at com.atlassian.jira.security.AbstractPermissionManager.hasPermission(AbstractPermissionManager.java:142) <+3>
at java.lang.reflect.Method.invoke(Unknown Source)
at com.atlassian.util.profiling.object.ObjectProfiler.profiledInvoke(ObjectProfiler.java:81)
at com.atlassian.jira.config.component.SwitchingInvocationHandler.invoke(SwitchingInvocationHandler.java:28)
at $Proxy80.hasPermission(Unknown Source)
....
at org.apache.velocity.app.VelocityEngine.mergeTemplate(VelocityEngine.java:381)
at com.atlassian.velocity.DefaultVelocityManager.getEncodedBody(DefaultVelocityManager.java:67)
at com.atlassian.jira.template.velocity.DefaultVelocityTemplatingEngine$DefaultRenderRequest.asHtml(DefaultVelocityTemplatingEngine.java:104)
at com.atlassian.jira.web.component.AbstractWebComponent.getHtml(AbstractWebComponent.java:35)
at com.atlassian.jira.web.component.IssueTableWebComponent$1.write(IssueTableWebComponent.java:149)
at com.atlassian.jira.web.component.IssueTableWebComponent.getHtml(IssueTableWebComponent.java:81)
at com.atlassian.jira.web.component.IssueTableWebComponent.getHtml(IssueTableWebComponent.java:47)
at com.atlassian.jira.bc.issue.table.DefaultIssueTableService.createIssueTable(DefaultIssueTableService.java:361)
at com.atlassian.jira.bc.issue.table.DefaultIssueTableService.getIssueTable(DefaultIssueTableService.java:262)
at com.atlassian.jira.bc.issue.table.DefaultIssueTableService.getIssueTableFromFilterWithJql(DefaultIssueTableService.java:183) <+3>
at java.lang.reflect.Method.invoke(Unknown Source)
at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$AbstractMultiTenantAwareInvocationHandler.invokeInternal(MultiTenantComponentFactoryImpl.java:181)
at com.atlassian.multitenant.impl.MultiTenantComponentFactoryImpl$MultiTenantAwareInvocationHandler.invoke(MultiTenantComponentFactoryImpl.java:211)
at $Proxy395.getIssueTableFromFilterWithJql(Unknown Source) <+3>
原因
There's a workflow scheme which is associated to a non-existent workflow.
診断
In order to confirm that please execute the following SQL query (made in PostgreSQL)
select * from workflowschemeentity where workflow not in (select workflowname from jiraworkflows)
ソリューション
データベースの変更を行う場合は 必ず事前にバックアップを取得してください。可能な場合はテスト サーバーで変更を試すことをおすすめします。
The workflow scheme should be updated manually with a valid workflow first via UI (if possible) else, it has to be modified in the database, as well as any entries associated to the invalid workflow at the changeitem and os_wfentry tables. The steps to perform this are as follows:
- Jira をシャットダウンします。
- Run the update statements to change the non-existent workflow name to the valid workflow
- Jira を再起動します。
Use the following update statements as an example of how it should look
UPDATE workflowschemeentity SET workflow = 'valid workflow' WHERE workflow = 'non-existent workflow'; UPDATE changeitem SET newstring = 'valid workflow' WHERE newstring = 'non-existent workflow'; UPDATE os_wfentry SET name = 'valid workflow' WHERE name = 'non-existent workflow';