xtdb icon indicating copy to clipboard operation
xtdb copied to clipboard

Compilation error with jar dependency - `Unable to find static field: new in class xtdb.types.ClojureForm`

Open refset opened this issue 1 year ago • 4 comments

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)

refset avatar Oct 17 '24 21:10 refset

Using [org.clojure/clojure "1.11.4"]

ryrobes avatar Oct 17 '24 22:10 ryrobes

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

ryrobes avatar Oct 17 '24 22:10 ryrobes

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!)

refset avatar Oct 18 '24 08:10 refset

Ah, yes that did it. Thank you.

ryrobes avatar Oct 18 '24 20:10 ryrobes