今天集成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.