我试图在远程模式下运行storm start示例。 当我使用以下方法将拓扑提交到风暴时:
storm jar .\target\storm-starter-0.0.1-SNAPSHOT-jar-with-dependencies.jar storm.starter.ExclamationTopology myTopology
我遇到了来自工作日志的以下错误: 有人遇到过这种问题吗? 提前谢谢!
2013-06-08 13:32:44 worker [ERROR] Error on initialization of server mk-worker
java.lang.RuntimeException: java.lang.ClassNotFoundException: storm.starter.ExclamationTopology$ExclamationBolt
at backtype.storm.utils.Utils.deserialize(Utils.java:70)
at backtype.storm.utils.Utils.getSetComponentObject(Utils.java:199)
at backtype.storm.daemon.task$get_task_object.invoke(task.clj:56)
at backtype.storm.daemon.task$mk_task_data$fn__3766.invoke(task.clj:158)
at backtype.storm.util$assoc_apply_self.invoke(util.clj:731)
at backtype.storm.daemon.task$mk_task_data.invoke(task.clj:152)
at backtype.storm.daemon.task$mk_task.invoke(task.clj:163)
at backtype.storm.daemon.executor$mk_executor$fn__3922.invoke(executor.clj:267)
at clojure.core$map$fn__4087.invoke(core.clj:2432)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
at clojure.lang.RT.seq(RT.java:473)
at clojure.core$seq.invoke(core.clj:133)
at clojure.core.protocols$seq_reduce.invoke(protocols.clj:30)
at clojure.core.protocols$fn__5875.invoke(protocols.clj:54)
at clojure.core.protocols$fn__5828$G__5823__5841.invoke(protocols.clj:13)
at clojure.core$reduce.invoke(core.clj:6030)
at clojure.core$into.invoke(core.clj:6077)
at backtype.storm.daemon.executor$mk_executor.invoke(executor.clj:267)
at backtype.storm.daemon.worker$fn__4348$exec_fn__1228__auto____4349$iter__4354__4358$fn__4359.invoke(worker.clj:354)
at clojure.lang.LazySeq.sval(LazySeq.java:42)
at clojure.lang.LazySeq.seq(LazySeq.java:60)
at clojure.lang.RT.seq(RT.java:473)
at clojure.core$seq.invoke(core.clj:133)
at clojure.core$dorun.invoke(core.clj:2725)
at clojure.core$doall.invoke(core.clj:2741)
at backtype.storm.daemon.worker$fn__4348$exec_fn__1228__auto____4349.invoke(worker.clj:354)
at clojure.lang.AFn.applyToHelper(AFn.java:185)
at clojure.lang.AFn.applyTo(AFn.java:151)
at clojure.core$apply.invoke(core.clj:601)
at backtype.storm.daemon.worker$fn__4348$mk_worker__4404.doInvoke(worker.clj:323)
at clojure.lang.RestFn.invoke(RestFn.java:512)
at backtype.storm.daemon.worker$_main.invoke(worker.clj:433)
at clojure.lang.AFn.applyToHelper(AFn.java:172)
at clojure.lang.AFn.applyTo(AFn.java:151)
at backtype.storm.daemon.worker.main(Unknown Source)
Caused by: java.lang.ClassNotFoundException: storm.starter.ExclamationTopology$ExclamationBolt
at java.net.URLClassLoader$1.run(Unknown Source)
at java.net.URLClassLoader$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Unknown Source)
at java.io.ObjectInputStream.resolveClass(Unknown Source)
at java.io.ObjectInputStream.readNonProxyDesc(Unknown Source)
at java.io.ObjectInputStream.readClassDesc(Unknown Source)
at java.io.ObjectInputStream.readOrdinaryObject(Unknown Source)
at java.io.ObjectInputStream.readObject0(Unknown Source)
at java.io.ObjectInputStream.readObject(Unknown Source)
at backtype.storm.utils.Utils.deserialize(Utils.java:64)
... 35 more
2013-06-08 13:32:44 util [INFO] Halting process: ("Error on initialization")
答案 0 :(得分:0)
找到了解决方案。 ClassNotFoundException是因为风暴找不到提交的jar,这是由于windows上的路径分隔符引起的;而风暴clojure源代码中的分隔符是unix分隔符:。