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

Andy Wu commented on RATIS-699:
-------------------------------

Thanks for working on this! I am also getting the following exception after 
upgrading into ratis-0.4.0 through maven repo. Is there anyway to do a minor 
release on ratis-0.4.0 since it is not usable for now?

{code:java}
Caused by: java.lang.NoClassDefFoundError: 
org/apache/hadoop/metrics2/lib/DefaultMetricsSystem
        at 
org.apache.ratis.metrics.MetricsReporting.<clinit>(MetricsReporting.java:42) 
~[ratis-metrics-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.metrics.RatisMetrics.<clinit>(RatisMetrics.java:39) 
~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.raftlog.segmented.SegmentedRaftLogWorker.<init>(SegmentedRaftLogWorker.java:176)
 ~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.raftlog.segmented.SegmentedRaftLog.<init>(SegmentedRaftLog.java:197)
 ~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.raftlog.segmented.SegmentedRaftLog.<init>(SegmentedRaftLog.java:183)
 ~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.impl.ServerState.initRaftLog(ServerState.java:188) 
~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.impl.ServerState.<init>(ServerState.java:120) 
~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.impl.RaftServerImpl.<init>(RaftServerImpl.java:110) 
~[ratis-server-0.4.0.jar:0.4.0]
        at 
org.apache.ratis.server.impl.RaftServerProxy.lambda$newRaftServerImpl$2(RaftServerProxy.java:208)
 ~[ratis-server-0.4.0.jar:0.4.0]
        at 
java.util.concurrent.CompletableFuture$AsyncSupply.run(CompletableFuture.java:1590)
 ~[na:1.8.0_101]
        at 
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) 
~[na:1.8.0_101]
        at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) 
~[na:1.8.0_101]
        at java.lang.Thread.run(Thread.java:745) ~[na:1.8.0_101]
{code}
Is there 


> Dependency is relying on system dependency jdk:tools:1.X
> --------------------------------------------------------
>
>                 Key: RATIS-699
>                 URL: https://issues.apache.org/jira/browse/RATIS-699
>             Project: Ratis
>          Issue Type: Bug
>          Components: metrics
>    Affects Versions: 0.4.0
>            Reporter: Henrik Hegardt
>            Assignee: Henrik Hegardt
>            Priority: Minor
>         Attachments: RATIS-699.03.patch, tree_new, tree_orig
>
>
> Ratis-Metric is depending on the dependency 
> com.github.joshelser:dropwizard-metrics-hadoop-metrics2-reporter: 0.1.2. This 
> in turn depends on the org.apache.hadoop:hadoop-common:2.6.0. This in turn 
> depends on org.apache.hadoop:hadoop-annotations:2.6.0 which have an 
> dependency on a system scoped dependency named jdk.tools:1.6. I'm running 
> java 11 and this dependency doesn't exist in my environment so I can't 
> compile with ratis included in my project because it fails trying to resolve 
> that dependency.
> However, the project ratis-hadoop depends on the the dependency 
> org.apache.hadoop:hadoop-common:3.1.1 (which should be upgraded to 3.1.2 
> because the sources are missing in 3.1.1) which doesn't have the 
> jdk.tools:1.6 dependency. So if I depend on this I can build the project 
> because the faulty 2.6.0 dependency is shadowed transitively by the 3.1.1 
> dependency and everything is compiling.
> The simple fix would be updating so ratis-metric is depending directly on the 
> 3.1.2 dependency instead since it effectively will be the 3.1.1 code you are 
> going run with anyway when running with the ratis-hadoop dependency.



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

Reply via email to