NullPointerException after importing workflow XML

お困りですか?

アトラシアン コミュニティをご利用ください。

コミュニティに質問

症状

After importing a workflow XML into JIRA, it is associated with a project. However, the workflow is not working and trying to change the workflow scheme will have the following error:

2012-01-13 13:25:08,876 http-8080-1 WARN admin 805x4665x1 1x445vs 10.49.228.67 /plugins/servlet/project-config/CMS/workflows [plugin.web.model.ResourceTemplateWebPanel] Error rendering WebPanel (workflows/workflows.vm): org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in  class com.atlassian.jira.web.component.IssueConstantWebComponent threw exception java.lang.NullPointerException at workflows/workflows.vm[line 136, column 65]
com.atlassian.templaterenderer.RenderingException: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in  class com.atlassian.jira.web.component.IssueConstantWebComponent threw exception java.lang.NullPointerException at workflows/workflows.vm[line 136, column 65]
	at com.atlassian.templaterenderer.velocity.one.six.internal.VelocityTemplateRendererImpl.render(VelocityTemplateRendererImpl.java:100)
	at com.atlassian.templaterenderer.AbstractVelocityWebPanelRenderer.render(AbstractVelocityWebPanelRenderer.java:33)
	at com.atlassian.plugin.web.model.ResourceTemplateWebPanel.getHtml(ResourceTemplateWebPanel.java:47)
	at com.atlassian.plugin.web.descriptors.DefaultWebPanelModuleDescriptor$ContextAwareWebPanel.getHtml(DefaultWebPanelModuleDescriptor.java:141)
	at com.atlassian.jira.projectconfig.tab.WebPanelTab.getTab(WebPanelTab.java:75)
	at com.atlassian.jira.projectconfig.servlet.PanelServlet.outputTab(PanelServlet.java:163)
	at com.atlassian.jira.projectconfig.servlet.PanelServlet.doGet(PanelServlet.java:136)

...
Caused by: org.apache.velocity.exception.MethodInvocationException: Invocation of method 'getHtml' in  class com.atlassian.jira.web.component.IssueConstantWebComponent threw exception java.lang.NullPointerException at workflows/workflows.vm[line 136, column 65]
...
Caused by: java.lang.NullPointerException

考えられる原因

Possibility 1: The workflow XML is not modified to match the Status ID in JIRA. Example line from workflow XML:
      <meta name="jira.status.id">10004</meta>
Possibility 2: An issue status described in the workflow XML does not exist in the issuestatus table in the database. Example lines from workflow XML:
  <step id="3" name="Blocked">
      <meta name="jira.status.id">10004</meta>

ソリューション

データベースの変更を行う場合は必ず事前にバックアップを取得してください。可能な場合は、まずステージング サーバーで SQL コマンドの変更、挿入、更新、または削除を行うようにします。

Possibility 1: The workflow XML is not modified to match the Status ID in Jira


  1. Jira をシャットダウンします。
  2. Check the available Status ID in JIRA database:

    SELECT * FROM issuestatus;
  3. Find the affected workflow in JIRA database:

    SELECT * FROM jiraworkflows;

    (info) The imported workflow is stored in the column 'DESCRIPTOR' of the table 'jiraworkflows' in XML format

  4. Search for the problematic Status ID from the table 'jiraworkflows' and modify it to match the result from STEP 3.
  5. Jira を再起動します。

Possibility 2: An issue status described in the workflow XML does not exist in the issuestatus table in the database.

  1. Jira をシャットダウンします。
  2. Check all available issuestatuses in JIRA database:

    SELECT * FROM issuestatus;
  3. Insert the needed issue status:

    INSERT INTO issuestatus (ID, SEQUENCE, pname, DESCRIPTION, ICONURL) VALUES("1004", "<check available sequences in issuestatus table and add 1>", "Blocked", "This issue is blocked by a blocking issue", "/images/icons/status_closed.gif");
  4. Jira を再起動します。


最終更新日 2025 年 5 月 12 日

この内容はお役に立ちましたか?

はい
いいえ
この記事についてのフィードバックを送信する
Powered by Confluence and Scroll Viewport.