我有风暴应用程序&其中包含一个自定义POJO(警报)类。我已将此类添加到storm配置对象中。警报类正在实施java.io.Serailable
界面&它也有serialVersionUID
。
conf.registerSerialization(Alerts.class);
但在风暴群集中执行时,我收到错误(ClassNotFoundException
)。我清除了动物园管理员和风暴数据/缓存目录,但仍然发生此错误。我提取了jar&在构建jar&之后检查警报类它在罐子里面。如果你们能给我一些解决这个问题的建议会很有帮助。
堆栈跟踪:
2015-11-07T02:13:57.130+0530 b.s.d.worker [ERROR] Error on initialization of server mk-worker
java.lang.RuntimeException: java.lang.ClassNotFoundException: com.example.testing.storm.models.Alerts
at backtype.storm.serialization.SerializationFactory.getKryo(SerializationFactory.java:100) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.serialization.KryoValuesDeserializer.<init>(KryoValuesDeserializer.java:33) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.serialization.KryoTupleDeserializer.<init>(KryoTupleDeserializer.java:39) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.daemon.executor$mk_executor_data$fn__4559.invoke(executor.clj:214) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.util$assoc_apply_self.invoke(util.clj:850) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.daemon.executor$mk_executor_data.invoke(executor.clj:214) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.daemon.executor$mk_executor.invoke(executor.clj:319) ~[storm-core-0.9.4.jar:0.9.4]
at backtype.storm.daemon.worker$fn__5033$exec_fn__1754__auto____5034$iter__5039__5043$fn__5044.invoke(worker.clj:422) ~[storm-core-0.9.4.jar:0.9.4]
at clojure.lang.LazySeq.sval(LazySeq.java:42) ~[clojure-1.5.1.jar:na]
at clojure.lang.LazySeq.seq(LazySeq.java:60) ~[clojure-1.5.1.jar:na]
at clojure.lang.RT.seq(RT.java:484) ~[clojure-1.5.1.jar:na]
at clojure.core$seq.invoke(core.clj:133) ~[clojure-1.5.1.jar:na]
at clojure.core$dorun.invoke(core.clj:2780) ~[clojure-1.5.1.jar:na]
at clojure.core$doall.invoke(core.clj:2796) ~[clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$fn__5033$exec_fn__1754__auto____5034.invoke(worker.clj:422) ~[storm-core-0.9.4.jar:0.9.4]
at clojure.lang.AFn.applyToHelper(AFn.java:185) [clojure-1.5.1.jar:na]
at clojure.lang.AFn.applyTo(AFn.java:151) [clojure-1.5.1.jar:na]
at clojure.core$apply.invoke(core.clj:617) ~[clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$fn__5033$mk_worker__5089.doInvoke(worker.clj:389) [storm-core-0.9.4.jar:0.9.4]
at clojure.lang.RestFn.invoke(RestFn.java:512) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker$_main.invoke(worker.clj:500) [storm-core-0.9.4.jar:0.9.4]
at clojure.lang.AFn.applyToHelper(AFn.java:172) [clojure-1.5.1.jar:na]
at clojure.lang.AFn.applyTo(AFn.java:151) [clojure-1.5.1.jar:na]
at backtype.storm.daemon.worker.main(Unknown Source) [storm-core-0.9.4.jar:0.9.4]