• java.lang.NoClassDefFoundError: org/apache/curator/RetryPolicy解决方法


    今天集成es-job到公司的框架时,启动时出现上述错误
    java.lang.NoClassDefFoundError: org/apache/curator/RetryPolicy 
    at  storm.kafka.KafkaSpout.open(KafkaSpout.java:68) 
    at backtype.storm.daemon.executor$fn__4949$fn__4964.invoke(executor.clj:542)
    at backtype.storm.util$async_loop$fn__452.invoke(util.clj:463) 
    at clojure.lang.AFn.run(AFn.java:24)
    at java.lang.Thread.run(Thread.java:745) 
    Caused by: java.lang.ClassNotFoundException: org.apache.curator.RetryPolicy 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:366) 
    at java.net.URLClassLoader$1.run(URLClassLoader.java:355) 
    at java.security.AccessController.doPrivileged(Native Method) 
    at java.net.URLClassLoader.findClass(URLClassLoader.java:354)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:425) 
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:308) 
    at java.lang.ClassLoader.loadClass(ClassLoader.java:358) ... 5 more

     在此之前将冲突不兼容的curator从2.11.1改成了2.10,后来是2.10.0,不存在2.10这个版本。

    Curator 存在版本兼容问题。

    Curator 2.x.x-兼容两个zk 3.4.x zk 3.5.x,

    Curator 3.x.x-兼容兼容zk 3.5。

    Versions
    The are currently two released versions of Curator, 2.x.x and 3.x.x:
    
    Curator 2.x.x - compatible with both ZooKeeper 3.4.x and ZooKeeper 3.5.x
    Curator 3.x.x - compatible only with ZooKeeper 3.5.x and includes support for new features such as dynamic reconfiguration, etc.
  • 相关阅读:
    多态小结
    Lambda小结
    网络编程小结
    内部类与Lambda
    线程小结
    关于java的静态绑定与动态绑定小结
    多线程
    英语语法十二(可数名词不规则变化)
    英语语法入门十四(名词的作用)
    英语语法入门十三(不可数名词)
  • 原文地址:https://www.cnblogs.com/zhjh256/p/9951594.html
Copyright © 2020-2023  润新知