After upgrading to Lifecycle version 186, when accessing the dashboard in the UI, you may observe the following internal error:
And the following NullPointerException in the clm-server.log:
ERROR [dw-522 - POST /rest/dashboard/policy/newestRisks?timestamp=1738144652726] <user-id> com.sonatype.insight.jaxrs.error.ErrorResponseGenerator - 500 Cannot invoke "com.sonatype.insight.brain.model.policy.PolicyViolationConstraintFacts.getConstraintFactsJson()" because "constraintFacts" is null (ID ffdb7e1249dd4ff3)
java.lang.NullPointerException: Cannot invoke "com.sonatype.insight.brain.model.policy.PolicyViolationConstraintFacts.getConstraintFactsJson()" because "constraintFacts" is null
at com.sonatype.insight.brain.dashboard.PostgresDashboardViolationRiskService.findSecurityVulnerabilityReferenceId(PostgresDashboardViolationRiskService.java:178)
at com.sonatype.insight.brain.dashboard.PostgresDashboardViolationRiskService.toDashboardViolationRiskDTO(PostgresDashboardViolationRiskService.java:171)
This is a known issue currently being tracked via bug ID CLM-34067.
As part of the upgrade, a background job runs to migrate data related to policy violations to a new database table and the above error can occur whilst this job is running.
Once the job completes, the dashboard will load correctly and the error will no longer occur.
The progress of this job can be tracked by grep'ing the clm-server.log for the string "com.sonatype.insight.brain.policy.violation.PolicyViolationConstraintFactsJsonAsyncDbMigration"
You will see output similar to the following:
2025-01-29 10:07:38,606+0000 DEBUG [QuartzScheduler_Worker-2] com.sonatype.insight.brain.policy.violation.PolicyViolationConstraintFactsJsonAsyncDbMigration - 10% : Processed 780000 policy violations of 7484430. Previous page migration time = 24415 ms