Uploaded image for project: 'camunda BPM'
  1. camunda BPM
  2. CAM-14311

Nullpointer exception on metrics generation on cleanup history job

    XMLWordPrintable

Details

    • Bug Report
    • Resolution: Unresolved
    • L3 - Default
    • None
    • 7.15.11
    • None
    • None

    Description

      Environment (Required on creation):

      camunda ce 7.15.0 ( sprng boot )
      linux / windows / docker, does not matter

      Description (Required on creation; please attach any relevant screenshots, stacktraces, log files, etc. to the ticket):

      • if metrics are disabled by config "metricsEnabled" it does not instantiate a DbMetricsReporter
        org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#initMetrics ( L2312 )
      • and if property "historyCleanupMetricsEnabled" is enabled ( by default ) and not explicitly disabled
      • the HistoryCleanupScheduler tries to access the DbMetricsReporter even metrics are disabled and get a nullpoiter exception
        org.camunda.bpm.engine.impl.jobexecutor.historycleanup.HistoryCleanupSchedulerCmd#reportMetrics ( L117)
      • in this case it fails to clean the history but also create an entry in ACT_GE_BYTEARRAY without any refference and TTL
      • due to the error is thrown many multiple times durng one cleanup job execution, the size of the table grows really fast
      • DB entry in ACT_GE_BYTEARRAY with following characteristics: NAME_ = "job.exceptionByteArray" TYPE_ = 3 REV_ = 1
        ID_ BYTES_ and CREATE_TIME_ are filled but the other values are NULL

      Steps to reproduce (Required on creation):

      • create a default clean engine
      • set: camunda.bpm.metrics.enabled= false

      Observed Behavior (Required on creation):

      every time history scheduler runs it throws a nullpointer exception instead of cleaning the history. and instead of cleaning the history it fills the table more

      Expected behavior (Required on creation):

      clean history, no nullpointer

      Root Cause (Required on prioritization):

      please refer to description

      Solution Ideas (Optional):

      • either extend documentation to set "historyCleanupMetricsEnabled" to false when disable metrics (https://docs.camunda.org/manual/7.15/user-guide/process-engine/metrics/)
      • or extend check "org.camunda.bpm.engine.impl.cfg.ProcessEngineConfigurationImpl#isHistoryCleanupMetricsEnabled" to take general metrics enabled into consideration ( prefered )
      • or instantiate dbMetricsReporter when one of the metrics options are enabled

      Hints (optional):

      mgm-controller-panel

        This is the controller panel for Smart Panels app

        Attachments

          Activity

            People

              Unassigned Unassigned
              schaefer Andreas Schäfer
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:

                Salesforce