We have a Spring Boot 3.1.8 Java application running on JDK 21.0.2 that connects to Datomic via com.datomic:peer
version 1.0.7075 library. We are trying to upgrade to Spring Boot 3.2.2, but when we do this, there is an error trying to connect to Datomic from our application. This is part of the stack trace:
Caused by: java.lang.IllegalArgumentException: Must hint overloaded method: toArray
at clojure.lang.Compiler$NewInstanceMethod.parse(Compiler.java:8375) \~\[clojure-1.9.0.jar!/:na\]
at clojure.lang.Compiler$NewInstanceExpr.build(Compiler.java:7937) \~\[clojure-1.9.0.jar!/:na\]
at clojure.lang.Compiler$NewInstanceExpr$DeftypeParser.parse(Compiler.java:7813) \~\[clojure-1.9.0.jar!/:na\]
at clojure.lang.Compiler.analyzeSeq([Compiler.java:7003](https://Compiler.java:7003)) \~\[clojure-1.9.0.jar!/:na\]
When I searched on internet, I found a similar issue when JDK 11 was introduced, but I don’t find anything now.
The weird thing is that the issue only happens when running my application in Docker. When I run the application from my editor (IntelliJ IDEA) directly, then there is no issue. We also have a lot of integration tests that use Testcontainers and there is no issue there as well. Those tests succeed.
Inside the docker container, I am using eclipse-temurin:21-jre-alpine
. I also tried with eclipse-temurin:21-jre
and eclipse-temurin:21.0.1_12-jre-alpine
, but there was no difference. Outside of the docker container, I also use Temurin 21.0.2 (installed via sdkman on macOS).
I would be happy with any pointers that might give me a clue to what the problem could be. I also wonder why the Clojure compiler seems to be doing things for a library I just use.
I also asked the question on reddit at Reddit - Dive into anything. One of the comments was that Clojure 1.9 (Which is a transitive dependency of com.datomic:peer
version 1.0.7075) might be a bit old. But I don’t know if I can just upgrade to a newer version?