I've build a very simple topology that uses a Kafka Spout, very much like this Streamparse's example [1], with just a few minor changes. This topology works great on local mode (development) but fails on a real Storm cluster. After the topology is submitted, Storm start to create its workers but fails with the following stack trace, full stack trace here [2]:

2017-02-09 12:46:28.776 b.s.d.worker [ERROR] Error on initialization of server mk-worker
clojure.lang.Compiler$CompilerException: java.lang.RuntimeException: Can't embed object in code, maybe print-dup not defined: java.nio.HeapByteBuffer[pos=0 lim=14 cap=14], compiling:(NO_SOURCE_PATH:0:0)
	at clojure.lang.Compiler.analyzeSeq(Compiler.java:6651) ~[clojure-1.6.0.jar:?]
	at clojure.lang.Compiler.analyze(Compiler.java:6445) ~[clojure-1.6.0.jar:?]
	at clojure.lang.Compiler.eval(Compiler.java:6700) ~[clojure-1.6.0.jar:?]
	at clojure.lang.Compiler.eval(Compiler.java:6666) ~[clojure-1.6.0.jar:?]
	at clojure.core$eval.invoke(core.clj:2927) ~[clojure-1.6.0.jar:?]
	at backtype.storm.thrift$instantiate_java_object.invoke(thrift.clj:38) ~[storm-core-0.10.2.jar:0.10.2]
	at backtype.storm.daemon.task$get_task_object.invoke(task.clj:85) ~[storm-core-0.10.2.jar:0.10.2]
	at backtype.storm.daemon.task$mk_task_data$fn__5375.invoke(task.clj:185) ~[storm-core-0.10.2.jar:0.10.2]
	at backtype.storm.util$assoc_apply_self.invoke(util.clj:912) ~[storm-core-0.10.2.jar:0.10.2]
	at backtype.storm.daemon.task$mk_task_data.invoke(task.clj:178) ~[storm-core-0.10.2.jar:0.10.2]
	at backtype.storm.daemon.task$mk_task.invoke(task.clj:189) ~[storm-core-0.10.2.jar:0.10.2]
	at backtype.storm.daemon.executor$mk_executor$fn__5575.invoke(executor.clj:352) ~[storm-core-0.10.2.jar:0.10.2]

I'm not sure if this has something to do with Streamparse or is just a Storm issue. I've done some debug and seems to happen when Clojure runs a eval to evaluate a Java object, probably my Java Spout, but I haven't be able to determine way it fails to evaluate. Anyway, I'm running with:

Storm version: 0.10.2
Streamparse 3.4.0
Java JRE 1.8.0_121

Any help is much appreciated. Thanks a lot for great work with Storm!

[1] - https://github.com/Parsely/streamparse/tree/master/examples/kafka-jvm
[2] - https://gist.github.com/victorpoluceno/9b8ace26a01488ccc8a0184d0bc58383


Victor Godoy Poluceno