Uploaded image for project: 'Camunda Optimize'
  1. Camunda Optimize
  2. OPT-5299

NPE on report evaluation after upgrade to 3.5.0

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Fixed
    • L3 - Default
    • 3.5.0
    • None
    • backend
    • None
    • Not defined

    Description

      Problem:
      After the upgrade to Optimize 3.5.0-alpha2 some report cannot be evaluated anymore due to a NullPopinterException:

      10:01:30.698 [qtp2061440682-129] ERROR o.c.o.r.p.GenericExceptionMapper - Mapping generic REST error
      java.lang.NullPointerException: null
      	at org.camunda.optimize.service.util.DefinitionQueryUtil.createTenantIdQuery(DefinitionQueryUtil.java:82)
      	at org.camunda.optimize.service.util.DefinitionQueryUtil.createDefinitionQuery(DefinitionQueryUtil.java:68)
      	at org.camunda.optimize.service.es.report.command.exec.ProcessReportCmdExecutionPlan.setupUnfilteredBaseQuery(ProcessReportCmdExecutionPlan.java:64)
      	at org.camunda.optimize.service.es.report.command.exec.ProcessReportCmdExecutionPlan.setupBaseQuery(ProcessReportCmdExecutionPlan.java:52)
      	at org.camunda.optimize.service.es.report.command.exec.ReportCmdExecutionPlan.createBaseQuerySearchRequest(ReportCmdExecutionPlan.java:120)
      	at org.camunda.optimize.service.es.report.command.exec.ReportCmdExecutionPlan.evaluate(ReportCmdExecutionPlan.java:72)
      	at org.camunda.optimize.service.es.report.command.exec.ReportCmdExecutionPlan.evaluate(ReportCmdExecutionPlan.java:66)
      	at org.camunda.optimize.service.es.report.command.ProcessCmd.evaluate(ProcessCmd.java:29)
      	at org.camunda.optimize.service.es.report.SingleReportEvaluator.evaluate(SingleReportEvaluator.java:73)
      	at org.camunda.optimize.service.es.report.ReportEvaluationHandler.evaluateSingleReportWithErrorCheck(ReportEvaluationHandler.java:156)
      	at org.camunda.optimize.service.es.report.ReportEvaluationHandler.evaluateReport(ReportEvaluationHandler.java:74)
      	at org.camunda.optimize.service.report.ReportEvaluationService.evaluateSavedReportWithAdditionalFilters(ReportEvaluationService.java:39)
      

      Steps to reproduce:

      1. Run Optimize 3.4.0
      2. Import the attached report
      3. Upgrade to Optimize 3.5.0-alpha2-RC1
      4. Run Optimize 3.5.0-alpha2-RC1 and open the report

      Actual result :

      Report evaluation fails with a 500, see screenshot

      Expected result:

      It should just work like in 3.4.0

      Cause:
      The cause is that for some old reports (before tenantIds were part of the report config) the tenantIds field never got initialized properly in elasticsearch. It was still available on the API due to the default value in the ProcessReportDataDto. With 3.5.0 and multi definitions a new ReportDataDefinitionDto was introduced that made use of the @Builder annotation by Lombok. Thus now the missing tenantIds field in the database lead to a missing tenantId list on the object due to the @Builder annotation hiding the default values, see https://github.com/projectlombok/lombok/issues/1347.

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Issue Links

            Activity

              People

                Unassigned Unassigned
                sebastian.bathke Sebastian Bathke
                Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved:

                  Salesforce