NullPointerException when accessing review
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Summary
Symptoms
Unable to access a specific review.
The following appears in the atlassian-fisheye-<date>.log
:
1
2
3
4
5
6
7
8
9
10
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)
Diagnosis
Run the following SQL query:
1
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.
Cause
The review does not have any author assigned to it. Crucible will hit into NullPointerException when searching for the review's author.
Solution
Resolution
Backup database for rollback purposes
Run the following SQL query to update an user to be the author of the review
1 2 3 4
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 thecru_participant_id
found at Diagnosis sectionWhen 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:
1
UPDATE cru_review_participant SET cru_reviewer=0 WHERE cru_participant_id=<id_from_diagnosis>;
Restart the server
Was this helpful?