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

java.lang.NoSuchMethodError in org.apache.storm:storm-kafka-monitor:jar:1.1.2 caused by dependency conflict issue

    XMLWordPrintableJSON

Details

    Description

      Hi, we found a dependency conflict issue in org.apache.storm:storm-kafka-monitor:jar:1.1.2, caused by org.apache.zookeeper:zookeeper:jar. As shown in the following dependency tree, due to Maven version management, org.apache.zookeeper:zookeeper:jar:3.4.6 will be loaded, during the packaging process.

       

      However, method <org.apache.zookeeper.server.quorum.flexible.QuorumMaj: void <init>(java.util.Map)> only defined in org.apache.zookeeper:zookeeper:jar 3.5.3-beta, so that there is a crash with the following stack trace when your project referencing the missing method.

       

      Stack trace:

      Exception in thread "main" java.lang.NoSuchMethodError: org.apache.zookeeper.server.quorum.flexible.QuorumMaj.<init>(Ljava/util/Map;)V

               at org.apache.curator.framework.imps.EnsembleTracker.<init>(EnsembleTracker.java:57)

               at org.apache.curator.framework.imps.CuratorFrameworkImpl.<init>(CuratorFrameworkImpl.java:159)

               at org.apache.curator.framework.CuratorFrameworkFactory$Builder.build(CuratorFrameworkFactory.java:158)

               at org.apache.curator.framework.CuratorFrameworkFactory.newClient(CuratorFrameworkFactory.java:109)

       

      Dependency tree:

      org.apache.storm:storm-kafka-monitor:jar:1.1.2

      +- org.apache.kafka:kafka-clients:jar:0.10.1.0:compile

        +- net.jpountz.lz4:lz4:jar:1.3.0:compile
        +- org.xerial.snappy:snappy-java:jar:1.1.2.6:compile
        - org.slf4j:slf4j-api:jar:1.7.21:compile

      +- org.apache.curator:curator-framework:jar:4.0.0:compile

        - org.apache.curator:curator-client:jar:4.0.0:compile
           +- org.apache.zookeeper:zookeeper:jar:3.4.6:compile (version managed from 3.5.3-beta)
           +- jline:jline:jar:0.9.94:compile  
            - io.netty:netty:jar:3.9.9.Final:compile (version managed from 3.7.0.Final)  
           +- com.google.guava:guava:jar:16.0.1:compile (version managed from 20.0)
           - (org.slf4j:slf4j-api:jar:1.7.21:compile - version managed from 1.7.6; omitted for duplicate)

      +- com.googlecode.json-simple:json-simple:jar:1.1:compile

      +- commons-cli:commons-cli:jar:1.3.1:compile

      • junit:junit:jar:4.11:test

         - org.hamcrest:hamcrest-core:jar:1.3:test

       

      Solution:

      One choice is to upgrade org.apache.zookeeper:zookeeper:jar to 3.5.3-beta, but it is not the best solution, as 3.5.3-beta is not a release version.**

       

      Thanks a lot!

      Regards,

      Leo

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              LeoAugust19 LeoAugust19
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 40m
                  40m