Iām brand new to clojure and trying to play around with jackdaw and Iām having a hell of a time just reading data off of a topic. I pulled the latest jackdaw into project.clj and when I start my repl I get this error and nothing in my namespace seems to be defined:
ā lein repl
#error {
:cause org.apache.kafka.streams.test.TestRecord
:via
[{:type clojure.lang.Compiler$CompilerException
:message Syntax error macroexpanding at (jackdaw/data/producer.clj:7:1).
:data #:clojure.error{:phase :execution, :line 7, :column 1, :source jackdaw/data/producer.clj}
:at [clojure.lang.Compiler load Compiler.java 7665]}
{:type java.lang.ClassNotFoundException
:message org.apache.kafka.streams.test.TestRecord
:at [java.net.URLClassLoader findClass URLClassLoader.java 476]}]
any ideas?interestingly, this works in 0.9.4 but 0.9.5 has a change that causes this error:
https://github.com/FundingCircle/jackdaw/pull/315
Found out that this is the dependancy that seems to help the tests pass:
https://github.com/FundingCircle/jackdaw/blob/d29d651bf6845fed61a30fbc68e4d5775a3b5481/project.clj#L90
[org.apache.kafka/kafka-streams-test-utils "2.8.0"]
Ah awesome, we came to the same discovery. I explicitly added that package to my deps and things started working š thanks for the help
still helping 1 year later! Thanks!!
Also just ran into this.`[org.apache.kafka/kafka-streams-test-utils "2.8.0"]` needs be added to the main deps (currently only in the dev deps) othwise the library is broken.
can you post your project.clj file?
I have done the following:
⢠lein new jackdaw-test
⢠updated the project.clj to
(defproject jackdaw-test "0.1.0-SNAPSHOT"
:description "FIXME: write description"
:url ""
:license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
:url " "}
:dependencies [[org.clojure/clojure "1.10.1"]
[fundingcircle/jackdaw "0.9.8"]]
:repl-options {:init-ns jackdaw-test.core})
⢠and run lein repl
⢠that dropped into jackdaw-test.core=> fineI was able to drop into a repl with just that as well, but as soon as I add a jackdaw reference into my namespace i get the error
Workspace/tmp/jackdaw-test
ā cat src/jackdaw_test/core.clj
(ns jackdaw-test.core
(:require [jackdaw.client]))
Workspace/tmp/jackdaw-test
ā lein repl
#error {
:cause org.apache.kafka.streams.test.TestRecord
:via
[{:type clojure.lang.Compiler$CompilerException
:message Syntax error macroexpanding at (jackdaw/data/producer.clj:7:1).
:data #:clojure.error{:phase :execution, :line 7, :column 1, :source jackdaw/data/producer.clj}
:at [clojure.lang.Compiler load Compiler.java 7665]}
{:type java.lang.ClassNotFoundException
:message org.apache.kafka.streams.test.TestRecord
:at [java.net.URLClassLoader findClass URLClassLoader.java 476]}]Iām not sure if its actually jackdaw or something wrong with how it pulled in/is loading the kafka libs?
jackdaw-test.core=> (import '(org.apache.kafka.streams.test TestRecord))
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:445).
org.apache.kafka.streams.test.TestRecord
I know nothing about how deps/loading works in java/clojure unfortunately