NullPointerException when accessing review

お困りですか?

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

コミュニティに質問

症状

Unable to access a specific review.

atlassian-fisheye-<date>.log に次のメッセージが表示される。

2013-08-13 14:31:28,036 ERROR [btpool0-1072 ] org.mortbay.log Slf4jLog-warn - Nested in javax.servlet.ServletException: javax.el.ELException: java.lang.NullPointerException:
javax.el.ELException: java.lang.NullPointerException
	at javax.el.BeanELResolver.getValue(BeanELResolver.java:298)
	at javax.el.CompositeELResolver.getValue(CompositeELResolver.java:175)
	at com.sun.el.parser.AstValue.getValue(AstValue.java:138)
...
Caused by: java.lang.NullPointerException
	at com.cenqua.crucible.view.ReviewParticipantDO.<init>(ReviewParticipantDO.java:22)
	at com.cenqua.crucible.view.ReviewDO.getAuthorPDO(ReviewDO.java:224)
	at sun.reflect.GeneratedMethodAccessor1232.invoke(Unknown Source)

診断

次の SQL クエリを実行します。

SELECT * FROM cru_review_participant WHERE cru_review_id = (SELECT cru_review_id FROM cru_revpermaid WHERE cru_proj_key='<project_key>' AND cru_number=<review_number>);

Substitute the <project_key> and <review_number> with the review key e.g.: CR-123 (<project_key>-<review_number>)

If the result does not have any user with cru_author=1, then the problem will happen.

原因

The review does not have any author assigned to it. Crucible will hit into NullPointerException when searching for the review's author.

ソリューション

  1. Backup database for rollback purposes
  2. Run the following SQL query to update an user to be the author of the review

    UPDATE cru_review_participant SET cru_author=1 WHERE cru_participant_id=<id_from_diagnosis>;
     
    --For PostgreSQL:
    UPDATE cru_review_participant SET cru_author='true' WHERE cru_participant_id=<id_from_diagnosis>;

    Substitute <id_from_diagnosis> with one of the cru_participant_id found at Diagnosis section

    When setting cru_author=1, make sure that the user in table is not also a reviewer (cru_reviewer=1 or true), as a user cannot be both owner and reviewer for a specific review. If they are: 

    UPDATE cru_review_participant SET cru_reviewer=0 WHERE cru_participant_id=<id_from_diagnosis>;
  3. Restart the server

最終更新日 2021 年 4 月 30 日

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

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