Re-Indexing fails with java.lang.NullPointerException on Link Type Indexing

お困りですか?

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

コミュニティに質問

症状

When trying to re-index JIRA, the below error is displayed.

java.util.concurrent.ExecutionException: java.lang.NullPointerException
Task completed in 5 seconds with unexpected error.
Started Today 11:07 AM.
Finished Today 11:07 AM.

atlassian-jira.log に次のエラーが返される。

2012-06-14 09:40:13,374 main ERROR      [atlassian.jira.upgrade.UpgradeManagerImpl] Exception thrown during upgrade: java.util.concurrent.ExecutionException: java.lang.NullPointerException
java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at com.atlassian.jira.index.FutureResult.await(FutureResult.java:35)
	at com.atlassian.jira.index.CompositeResultBuilder$CompositeResult.await(CompositeResultBuilder.java:82)
	at com.atlassian.jira.issue.index.DefaultIndexManager.reIndexAll(DefaultIndexManager.java:257)
    ...
Caused by: java.util.concurrent.ExecutionException: java.lang.NullPointerException
	at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
	at java.util.concurrent.FutureTask.get(Unknown Source)
	at com.atlassian.jira.index.FutureResult.await(FutureResult.java:31)
    ...
Caused by: java.lang.NullPointerException
	at com.atlassian.jira.issue.index.indexers.impl.SubTaskIndexer.addIndex(SubTaskIndexer.java:54)
	at com.atlassian.jira.issue.index.IssueDocument.getDocument(IssueDocument.java:40)
	at com.atlassian.jira.issue.index.DefaultIssueDocumentFactory.get(DefaultIssueDocumentFactory.java:15)

原因

The link type for a sub-task is not linked together correctly.  The Zephyr for JIRA (v.1.7) plugin has logic in it which will check for, and create a issueLinkType "Relates".  It also creates a link using the id 10003, which can cause errors if these links have been renamed or changed.  

ソリューション

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

  1. Find out which linking type is being affected:

    SELECT * from issuelink where linktype NOT IN (SELECT id from issuelinktype);
  2. Check the current link types to see which one to assign to the corrupted entry. They can be identified with the below:

    SELECT id, linkname from issuelinktype;
  3. Update the corrupted entry to the link type from the previous SQL:

    UPDATE issuelink SET linktype = <issuetlinktype_id> where id = <result_from_first_query>;
  4. Jira を停止します。
  5. Remove the $JIRA_HOME/caches/indexes directory. This will be rebuilt when JIRA is indexed again.
  6. Jira を起動します。

(info) The above SQL is for PostgreSQL and may need to be modified, depending on the type of database the JIRA instance uses.


最終更新日 2020 年 8 月 21 日

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

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