This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-15
Channels
- # adventofcode (80)
- # beginners (94)
- # biff (19)
- # cider (74)
- # clj-kondo (11)
- # cljs-dev (7)
- # clojure (110)
- # clojure-austin (3)
- # clojure-australia (1)
- # clojure-belgium (1)
- # clojure-china (1)
- # clojure-europe (83)
- # clojure-filipino (1)
- # clojure-hk (1)
- # clojure-indonesia (1)
- # clojure-japan (1)
- # clojure-korea (1)
- # clojure-my (1)
- # clojure-nl (1)
- # clojure-norway (4)
- # clojure-sg (1)
- # clojure-taiwan (1)
- # clojure-uk (2)
- # cursive (3)
- # data-science (8)
- # datalevin (8)
- # emacs (18)
- # etaoin (5)
- # graalvm (1)
- # holy-lambda (3)
- # honeysql (1)
- # jackdaw (10)
- # java (10)
- # jobs (3)
- # luminus (9)
- # malli (106)
- # off-topic (88)
- # polylith (8)
- # portal (2)
- # re-frame (50)
- # reagent (11)
- # reitit (74)
- # remote-jobs (1)
- # shadow-cljs (46)
- # tools-deps (26)
- # xtdb (49)
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?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 unfortunatelyinterestingly, 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
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.