You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ratis.apache.org by "Clay B. (Jira)" <ji...@apache.org> on 2019/11/11 03:37:00 UTC
[jira] [Comment Edited] (RATIS-750) Ratis server fails with
"java.lang.ClassNotFoundException:
com.codahale.metrics.jvm.GarbageCollectorMetricSet"
[ https://issues.apache.org/jira/browse/RATIS-750?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16971292#comment-16971292 ]
Clay B. edited comment on RATIS-750 at 11/11/19 3:36 AM:
---------------------------------------------------------
It seems the import came in from RATIS-702. I see that {{io.dropwizard.metrics}} artifact {{metrics-jvm}} is marked as {{optional}} in the {{ratis-metrics}} {{pom.xml}}. Removing the optional allows the server to start. It seems {{ratis-test}} and {{ratis-logservice}} may be similarly impacted as they have the dependency marked for scope {{test}}.
was (Author: clayb):
It seems the import came in from RATIS-720. I see that {{io.dropwizard.metrics}} artifact {{metrics-jvm}} is marked as {{optional}} in the {{ratis-metrics}} {{pom.xml}}. Removing the optional allows the server to start. It seems {{ratis-test}} and {{ratis-logservice}} may be similarly impacted as they have the dependency marked for scope {{test}}.
> Ratis server fails with "java.lang.ClassNotFoundException: com.codahale.metrics.jvm.GarbageCollectorMetricSet"
> --------------------------------------------------------------------------------------------------------------
>
> Key: RATIS-750
> URL: https://issues.apache.org/jira/browse/RATIS-750
> Project: Ratis
> Issue Type: Bug
> Components: build
> Reporter: Clay B.
> Assignee: Clay B.
> Priority: Major
> Attachments: 0001-RATIS-750.-Ratis-server-fails-with-java.lang.ClassNo.patch
>
>
> In testing the current master, starting the Ratis server via {{./ratis-examples/src/main/bin/server.sh filestore server --storage $storage --id $id --peers $peers 2>&1 | \}} I end up with the following failure to start:
> {code:java}
> Found /home/vagrant/incubator-ratis/ratis-examples/target/ratis-examples-0.5.0-SNAPSHOT.jar
> 2019-11-11 03:27:52 INFO MetricRegistries:64 - Loaded MetricRegistries class org.apache.ratis.metrics.impl.MetricRegistriesImpl
> 2019-11-11 03:27:52 WARN MetricRegistriesImpl:61 - First MetricRegistry has been created without registering reporters. You may need to call MetricRegistries.global().addReportRegistration(...) before.
> Exception in thread "main" java.lang.NoClassDefFoundError: com/codahale/metrics/jvm/GarbageCollectorMetricSet
> at org.apache.ratis.metrics.JVMMetrics.addJvmMetrics(JVMMetrics.java:42)
> at org.apache.ratis.metrics.JVMMetrics.initJvmMetrics(JVMMetrics.java:32)
> at org.apache.ratis.examples.filestore.cli.Server.run(Server.java:60)
> at org.apache.ratis.examples.common.Runner.main(Runner.java:58)
> Caused by: java.lang.ClassNotFoundException: com.codahale.metrics.jvm.GarbageCollectorMetricSet
> at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
> 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)
> ... 4 more
> === Command terminated normally (Mon Nov 11 03:27:52 2019) === {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)