Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-3558

com/codahale/metrics/JmxReporter is not found on LocalCluster

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 2.1.0
    • Fix Version/s: None
    • Component/s: storm-client
    • Labels:
      None
    • Environment:
      Storm 2.1.0
      JDK 1.8

      Description

      Hi team,

      I need add the following metrics-core dependency in the pom.xml, otherwise the exception will be thrown when I run storm locally. Is it a bug?

      pom.xml:

      <dependencies>
      <dependency>
      <groupId>org.apache.storm</groupId>
      <artifactId>storm-client</artifactId>
      </dependency>

      <dependency>
      <groupId>org.apache.storm</groupId>
      <artifactId>storm-server</artifactId>
      </dependency>

      <dependency>
      <groupId>com.codahale.metrics</groupId>
      <artifactId>metrics-core</artifactId>
      <scope>compile</scope>
      </dependency>

      </dependencies>

      Exception log:

      18:10:10.810 [main] INFO o.a.s.d.m.ClientMetricsUtils - Using statistics reporter plugin:org.apache.storm.daemon.metrics.reporters.JmxPreparableReporter
      18:10:10.811 [main] INFO o.a.s.d.m.r.JmxPreparableReporter - Preparing...
      Exception in thread "main" java.lang.NoClassDefFoundError: com/codahale/metrics/JmxReporter
      at org.apache.storm.daemon.metrics.reporters.JmxPreparableReporter.prepare(JmxPreparableReporter.java:32)
      at org.apache.storm.metric.StormMetricsRegistry.startMetricsReporters(StormMetricsRegistry.java:74)
      at org.apache.storm.LocalCluster.<init>(LocalCluster.java:287)
      at org.apache.storm.LocalCluster.<init>(LocalCluster.java:159)
      at com.cc.trident.TridentWordCountTopologyLocal.main(TridentWordCountTopologyLocal.java:29)
      Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.JmxReporter
      at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
      at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
      ... 5 more

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              AK47Sonic AK47Sonic
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated: