Fork me on GitHub

I am in a situation where I need to use java 17 and I think I need to add the jvm options recommended (datalevin worked fine with Java 11 on my setting based upon leiningen). So I added :jvm-opts part like below but still not working. Can someone let me know if this look right?

(defproject ... "0.1.0-SNAPSHOT"
  :dependencies [[datalevin "0.6.16"]
                 [metosin/reitit "0.5.18"]
                 [org.clojure/clojure "1.10.0"]
                 [ring/ring-jetty-adapter "1.9.5"]]
  :jvm-opts ["--add-opens=java.base/java.nio=ALL-UNNAMED"


Fyi, this is the log message I am currently getting.

Execution error (InaccessibleObjectException) at java.lang.reflect.AccessibleObject/checkCanSetAccessible (
Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @202b84a6
ERROR: Unhandled REPL handler exception processing message {:op stacktrace, :nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :session 362ae053-b433-4eb6-9618-d0167b312a90, :id 9}
java.util.concurrent.ExecutionException: java.lang.NoClassDefFoundError: Could not initialize class org.lmdbjava.ByteBufferProxy
	at java.base/
	at java.base/java.util.concurrent.FutureTask.get(


You have wrong syntax.


:jvm-opts [“--add-opens” “java.base/java.nio=ALL-UNNAMED” “--add-opens” “java.base/java.lang=ALL-UNNAMED” “--add-opens” “java.base/” “--add-opens” “java.base/jdk.internal.ref=ALL-UNNAMED”]

👍 1

above are what in the project.clj of datalevin code base


I got it. Thanks!

Mike Engelhart12:09:35

@U0A74MRCJ I’m also running into this problem with deps.edn. I followed the instructions in one of the github issues related to this but your example shows starting the application with the command line. I’m trying to simply test out datalevin and the sample for deps.edn doesn’t work with cider-jack-in in Emacs. Any idea on how to configure this for Cider and working in a repl?


I don't know how cider uses deps.edn, maybe ask in cider channel?