今天集成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這個版本。
java
Curator 存在版本兼容問題。apache
Curator 2.x.x-兼容兩個zk 3.4.x 和zk 3.5.x,框架
Curator 3.x.x-兼容兼容zk 3.5。async
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.