xtdb
xtdb copied to clipboard
Compilation error with jar dependency - `Unable to find static field: new in class xtdb.types.ClojureForm`
A user has reported the following error when trying to use XTDB in-process:
Syntax error compiling at (xtdb/serde.clj:275:27).
Unable to find static field: new in class xtdb.types.ClojureForm
Full report at:
/tmp/clojure-7960271029556987275.edn
user@dev:~/project/backend$ java -version
openjdk version "21.0.4" 2024-07-16
OpenJDK Runtime Environment (build 21.0.4+7-Ubuntu-1ubuntu224.04)
OpenJDK 64-Bit Server VM (build 21.0.4+7-Ubuntu-1ubuntu224.04, mixed mode, sharing)
Using [org.clojure/clojure "1.11.4"]
Can repro pretty easily.
lein new app xtdb-b2-test
add to project.clj deps:
[com.xtdb/xtdb-core "2.0.0-beta2"]
[com.xtdb/xtdb-api "2.0.0-beta2"]
req it:
(ns xtdb-b2-test.core
(:require [xtdb.api :as xtdb-api])
(:gen-class))
lein run
Syntax error compiling at (xtdb/serde.clj:275:27).
Unable to find static field: new in class xtdb.types.ClojureForm
Full report at:
/tmp/clojure-14975849152355841541.edn
Hey @ryrobes thanks for the added detail - can you try bumping to Clojure 1.12.0? It is very lightly implied in https://docs.xtdb.com/clients/clojure.html#_clojure_api already (but we'll make that more explicit!)
Ah, yes that did it. Thank you.