[ 
https://issues.apache.org/jira/browse/ZOOKEEPER-3647?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17038070#comment-17038070
 ] 

maoling edited comment on ZOOKEEPER-3647 at 2/17/20 3:27 AM:
-------------------------------------------------------------

_*After building successfully I was trying to run the ZooKeeperServerMain class 
with the zoo_sample.cfg and getting the following exception:*_

[~pramahap]

server starts with the class: 
org.apache.zookeeper.server.quorum.QuorumPeerMain, not ZooKeeperServerMain, why 
not use the ready-made shell script: zkServer.sh


was (Author: maoling):
_*After building successfully I was trying to run the ZooKeeperServerMain class 
with the zoo_sample.cfg and getting the following exception:*_

[~pramahap]

server starts with the class: 
org.apache.zookeeper.server.quorum.QuorumPeerMain, not ZooKeeperServerMain, why 
not use the shell script: zkServer.sh

> Exception in thread "main" java.lang.NoClassDefFoundError: 
> com/codahale/metrics/Reservoir
> -----------------------------------------------------------------------------------------
>
>                 Key: ZOOKEEPER-3647
>                 URL: https://issues.apache.org/jira/browse/ZOOKEEPER-3647
>             Project: ZooKeeper
>          Issue Type: Bug
>          Components: build
>            Reporter: Prachi Prakash
>            Priority: Trivial
>
> After building successfully I was trying to run the ZooKeeperServerMain class 
> with the zoo_sample.cfg and getting the following exception:
> Exception in thread "main" java.lang.NoClassDefFoundError: 
> com/codahale/metrics/ReservoirException in thread "main" 
> java.lang.NoClassDefFoundError: com/codahale/metrics/Reservoir at 
> org.apache.zookeeper.metrics.impl.DefaultMetricsProvider$DefaultMetricsContext.lambda$getSummary$2(DefaultMetricsProvider.java:126)
>  at 
> java.util.concurrent.ConcurrentHashMap.computeIfAbsent(ConcurrentHashMap.java:1660)
>  at 
> org.apache.zookeeper.metrics.impl.DefaultMetricsProvider$DefaultMetricsContext.getSummary(DefaultMetricsProvider.java:122)
>  at org.apache.zookeeper.server.ServerMetrics.<init>(ServerMetrics.java:74) 
> at org.apache.zookeeper.server.ServerMetrics.<clinit>(ServerMetrics.java:44) 
> at 
> org.apache.zookeeper.server.ZooKeeperServerMain.runFromConfig(ZooKeeperServerMain.java:132)
>  at 
> org.apache.zookeeper.server.ZooKeeperServerMain.initializeAndRun(ZooKeeperServerMain.java:112)
>  at 
> org.apache.zookeeper.server.ZooKeeperServerMain.main(ZooKeeperServerMain.java:67)Caused
>  by: java.lang.ClassNotFoundException: *com.codahale.metrics.Reservoir* at 
> java.net.URLClassLoader.findClass(URLClassLoader.java:381) at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:424) at 
> sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) at 
> java.lang.ClassLoader.loadClass(ClassLoader.java:357) ... 8 more
> Can anyone guide on how to rectify this, it uses 
> <dropwizard.version>3.2.5</dropwizard.version> not the 4.x 
>  
>  



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to