Fork me on GitHub

Hello, how far have folks gotten with getting h2 databases to work with native-image compiled clojure programs? I am trying to use com.h2database/h2 with next.jdbc in my CLI application called zic. It all works when I run with java -jar on my uberjar, but when I compile with native-image I get a NullPointerException when the org.h2.engine.SessionRemote.connectEmbeddedOrServer function tries to run. I am using com.github.clj-easy/graal-config-h2, com.github.clj-easy/next.jdbc, etc. in my deps.edn file when I compile the program.


I understand timezones are going to possibly delay replies 🙂 I am in Utah, UTC -0600 timezone myself. My code is here: (`djhaskin987/zic` github repo on the feature/add-deps-edn branch). To reproduce the error, you simply have to run make test-native from the root of the repo, if anyone is interested. Thanks!


@djhaskin987 Not sure about H2. I do have a config for HSQLDB


sqlite is also known to work well with graalvm

🤯 1
Karol Wójcik09:08:29

H2 should work I think. At least it was working for latest dev version

Karol Wójcik09:08:22

@djhaskin987 you can try this config. We made clj-easy config repository before „conditions” were even the thing. @borkdude I’m not sure what to do with clj-easy/graal-config. I would love the GraalVM team to allow us putting our configs for Java & Clj libs on their repository. From clj-easy side we would need additional tooling for feeding the native-image with those configurations in Clojure.

👀 1
gratitude-thank-you 1