NullPointerException while loading Epic Burndown chart
Platform Notice: Data Center - This article applies to Atlassian products on the Data Center platform.
Note that this knowledge base article was created for the Data Center version of the product. Data Center knowledge base articles 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
Epic burndown chart from board could not be loaded with NullPointerException
in the response and Jira logs as well.
Environment
All Jira Versions
Diagnosis
NullpointerException
in atlassian-jira.log for the epicburndown chart endpoint.
109.40.241.211,109.40.241.211,10.74.190.139,109.40.241.211,127.0.0.1 /rest/greenhopper/1.0/rapid/charts/epicburndownchart [c.a.p.r.c.error.jersey.ThrowableExceptionMapper] Uncaught exception thrown by REST service: null
java.lang.NullPointerException
at com.atlassian.greenhopper.web.rapid.sprint.SprintReportEntryTransformer.transform(SprintReportEntryTransformer.java:24)
at com.atlassian.greenhopper.web.rapid.sprint.SprintReportEntryTransformer.transform(SprintReportEntryTransformer.java:7)
at com.atlassian.greenhopper.util.Transformer.apply(Transformer.java:15)
at com.atlassian.greenhopper.util.Transformer.apply(Transformer.java:26)
at com.atlassian.greenhopper.web.rapid.chart.EpicBurndownChartModelFactory.constructEpicBurndownModel(EpicBurndownChartModelFactory.java:173)
at com.atlassian.greenhopper.web.rapid.chart.EpicBurndownChartModelFactory.getEpicBurndownChartModel(EpicBurndownChartModelFactory.java:88)
at com.atlassian.greenhopper.web.rapid.chart.RapidChartResource.lambda$getEpicBurndownChart$13(RapidChartResource.java:359)
at com.atlassian.greenhopper.web.util.RestCall.response(RestCall.java:38)
at com.atlassian.greenhopper.web.AbstractResource.createResponse(AbstractResource.java:87)
at com.atlassian.greenhopper.web.AbstractResource.response(AbstractResource.java:69)
at com.atlassian.greenhopper.web.rapid.chart.RapidChartResource.getEpicBurndownChart(RapidChartResource.java:349)
at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
Cause
There is Sprint in the Database whose Completed Date is Null
for the closed Sprint. Ideally for any closed sprint, the completed date should not be NULL and should have valid date value.
Solution
Updating sprints Complete date may not be possible via REST api as it is already closed hence update it in Database by following the below listed steps.
STEPS:
- Execute below sql against the Jira database to fetch the list of sprint records that has NULL value in the Complete Date for the closed Sprint.
select * from "AO_60DB71_SPRINT" where "CLOSED" = 't' and "COMPLETE_DATE" IS null;
- Execute below sql against the Jira database to fetch the list of sprint records that has NULL value in the Complete Date for the closed Sprint.
- Take complete DB backup before you proceed to update the sprint records.
- Modify the value in the below SQL obtained from above SQL and provide an appropriate Date value for COMPLETE_DATE. Please note below sql is for postgres DB, you may want to modify according to your Database.
update "AO_60DB71_SPRINT" set "COMPLETE_DATE"='1617765066809' WHERE "ID"=2
- Restart Jira to have fresh Sprint cache.