Uploaded image for project: 'Hawkular Metrics'
  1. Hawkular Metrics
  2. HWKMETRICS-577

NPE in DropWizardReporter due to admin tenant changes

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Done
    • Affects Version/s: 0.23.2, 0.24.0
    • Fix Version/s: 0.23.2, 0.24.0
    • Component/s: Core
    • Labels:
      None

      Description

      There were changes to MetricNameService as part of the work for HWKMETRICS-572. The adminTenant field is not set, which cause a NPE in DropWizardReporter. Here is the stack trace:

      2017-01-18 16:32:43,859 ERROR [com.codahale.metrics.ScheduledReporter] (metrics-hawkular-metrics-reporter-1-thread-1) RuntimeException thrown from DropWizardReporter#report. Exception was suppressed.: java.lang.NullPointerException
      	at org.hawkular.metrics.core.dropwizard.DropWizardReporter.getMetricId(DropWizardReporter.java:186)
      	at org.hawkular.metrics.core.dropwizard.DropWizardReporter.lambda$report$1(DropWizardReporter.java:82)
      	at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet.lambda$entryConsumer$0(Collections.java:1575)
      	at java.lang.Iterable.forEach(Iterable.java:75)
      	at java.util.Collections$UnmodifiableMap$UnmodifiableEntrySet.forEach(Collections.java:1580)
      	at org.hawkular.metrics.core.dropwizard.DropWizardReporter.report(DropWizardReporter.java:81)
      	at com.codahale.metrics.ScheduledReporter.report(ScheduledReporter.java:162)
      	at com.codahale.metrics.ScheduledReporter$1.run(ScheduledReporter.java:117)
      	at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511)
      	at java.util.concurrent.FutureTask.runAndReset(FutureTask.java:308)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$301(ScheduledThreadPoolExecutor.java:180)
      	at java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:294)
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
      	at java.lang.Thread.run(Thread.java:745)
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                john.sanda John Sanda
                Reporter:
                john.sanda John Sanda
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: