This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-12-16
Channels
- # adventofcode (24)
- # announcements (3)
- # aws (3)
- # babashka (16)
- # beginners (88)
- # biff (5)
- # calva (27)
- # cider (15)
- # cljs-dev (70)
- # clojure (87)
- # clojure-austin (3)
- # clojure-belgium (6)
- # clojure-europe (59)
- # clojure-nl (1)
- # clojure-norway (14)
- # clojure-uk (3)
- # clojurescript (37)
- # data-science (2)
- # datalevin (40)
- # datomic (1)
- # emacs (23)
- # events (2)
- # graalvm (13)
- # graphql (7)
- # gratitude (1)
- # holy-lambda (193)
- # inf-clojure (15)
- # lsp (27)
- # malli (9)
- # off-topic (20)
- # polylith (6)
- # reitit (29)
- # releases (2)
- # scittle (13)
- # shadow-cljs (51)
- # transit (15)
- # xtdb (29)
Correct. The library is released for Java 8, so it should work for any version after that.
Please do test and report, as I do not have a M1. It passed all the tests on a M1 CI runner, so I assume it should work.
Just got a M1 and tried. I still have the error:
Couldn't load Clojure file: Unable to make field long java.nio.Buffer.address accessible: module java.base does not "opens java.nio" to unnamed module @54307ae0 systems.clj line:39 column:3
The java version:
ava -version
openjdk version "19.0.1" 2022-10-18
OpenJDK Runtime Environment Homebrew (build 19.0.1)
OpenJDK 64-Bit Server VM Homebrew (build 19.0.1, mixed mode, sharing)
The mac specs:
Software:
System Software Overview:
System Version: macOS 13.0 (22A380)
Kernel Version: Darwin 22.1.0
Boot Volume: Macintosh HD
Boot Mode: Normal
Computer Name: Loic's Laptop
Secure Virtual Memory: Enabled
System Integrity Protection: Enabled
Time since boot: 1 day, 21 hours, 39 minutes
Hardware:
Hardware Overview:
Model Name: MacBook Pro
Model Identifier: MacBookPro18,3
Model Number: Z15G0018AZP/A
Chip: Apple M1 Pro
Total Number of Cores: 8 (6 performance and 2 efficiency)
Memory: 32 GB
System Firmware Version: 8419.41.10
OS Loader Version: 8419.41.10
Serial Number (system): D3KHY729FQ
Hardware UUID: 6A9EE39E-2A94-5575-91A4-FE2EC906FB07
Provisioning UDID: 00006000-001030120AFA401E
Activation Lock Status: Enabled
Deps in my deps.edn
:
datalevin/datalevin {:mvn/version "0.7.2"}
-----------Sorry, I forgot to specify that. I do have it already: in deps.edn:
:jvm-opts ["--add-opens=java.base/java.nio=ALL-UNNAMED"
"--add-opens=java.base/sun.nio.ch=ALL-UNNAMED"]
It has to be put in an alias? cannot be at the deps.edn top level? (I am assuming that's my mistake)
Putting the jvm-opts in the alias worked. So I guess, we cannot put it at the top level, could not find doc that confirms it. Sorry for inconvenience! So everything work on my side now! Thanks for the update!
I created a docker image using jibbit, but when I start the container, I get:
Syntax error compiling at (datalevin/spill.clj:73:45).
Unable to resolve symbol: random-uuid in this context
It used to work fine on mac intel and java8
I tried with the following base images:
(jibbit default) and openjdk:11-slim-buster
------random-uuid
appears in Clojure 1.11. I expect people are using the latest version of Clojure. There’s no reason not to use the latest Clojure.
I was a bit surprised because our project uses the latest version of Clojure (I did not specify older version of clojure in my deps.edn). But for some reasons, jibbit packaged Clojure 1.10.4. So I specified the 1.11.1 version in my deps.edn to ensure this version is used and it works as expected now. Thank you.
Just confirming that :jvm-opts
needs to be in an alias. https://clojure.atlassian.net/browse/TDEPS-63
Hi, I'm trying to use datalevin kv when running in server mode (via the jar). This is in development, server is running on same machine as the client jvm. I can use the server fine as a datalog store. I get the following error when attempting to open a sub-db though (via (d/open-dbi)
:
(def kv-db (d/open-kv ""))
(def table (d/open-dbi kv-db "temp"))
=>
Execution error (ExceptionInfo) at datalevin.client/normal-request (client.clj:342).
Request to Datalevin server failed: "No implementation of method: :open-dbi of protocol: #'datalevin.lmdb/ILMDB found for class: datalevin.storage.Store"
and just verified local storage does work:
(def d (d/open-kv "/tmp/hello1"))
(def table (d/open-dbi d "temp"))
(d/transact-kv d [[:put "temp" :test "data"]] )
(d/get-value d "temp" :test)
=> "data"
this is on 0.6.29ahh the kv database cannot be the same as the datalog one. I'd be happy to update the docs for this - would you accept a documentation PR for this?
unrelated to that I was trying to create a new user that only has write permission for one db instead of all dbs, and I'm getting the following error:
;; in a datalevin commandline repl:
(def client (new-client ""))
(create-user client "test-user" "password")
(create-database client "test-db" :datalog)
(grant-permission client :datalevin.role/test-user :datalevin.server/create :datalevin.server/database "test-db")
;; in the server process' terminal log:
=>
2022-12-16T21:52:01.395Z dv-homebase DEBUG [datalevin.server:2049] - Message received: {:type :grant-permission, :writing? false}
2022-12-16T21:52:01.396Z dv-homebase ERROR [datalevin.server:?] -
java.lang.Thread.run Thread.java: 833
java.util.concurrent.ThreadPoolExecutor$Worker.run ThreadPoolExecutor.java: 635
java.util.concurrent.ThreadPoolExecutor.runWorker ThreadPoolExecutor.java: 1136
...
datalevin.server/handle-read/fn/fn server.clj: 2075
datalevin.server/handle-message server.clj: 2052
datalevin.server/grant-permission server.clj: 1386
datalevin.server/transact-role-permission server.clj: 393
datalevin.server/permission-eid server.clj: 257
datalevin.core/q core.cljc: 195
clojure.core/apply core.clj: 669
...
datalevin.query/q query.cljc: 1174
datalevin.query/q query.cljc: 1189
datalevin.query/resolve-ins query.cljc: 428
clojure.lang.ExceptionInfo: Too few inputs passed, expected: [$ ?act ?obj ?tgt], got: 3
error: :query/inputs
expected: [{:variable {:symbol $}}
{:variable {:symbol ?act}}
{:variable {:symbol ?obj}}
{:variable {:symbol ?tgt}}]
got: ({:store
#object[datalevin.storage.Store 0x7c0b0bd9 "datalevin.storage.Store@7c0b0bd9"],
:eavt
#{#datalevin/Datom [32 :database/name "test-db"]
#datalevin/Datom [32 :database/type :datalog]
#datalevin/Datom [33 :permission/act :datalevin.server/create]
#datalevin/Datom [33 :permission/obj :datalevin.server/database]
#datalevin/Datom [33 :permission/tgt 32]
#datalevin/Datom [34 :role-perm/perm 33]
#datalevin/Datom [34 :role-perm/role 2]},
:avet
#{#datalevin/Datom [32 :database/name "test-db"]
#datalevin/Datom [32 :database/type :datalog]
#datalevin/Datom [33 :permission/act :datalevin.server/create]
#datalevin/Datom [33 :permission/obj :datalevin.server/database]
#datalevin/Datom [33 :permission/tgt 32]
#datalevin/Datom [34 :role-perm/perm 33]
#datalevin/Datom [34 :role-perm/role 2]},
:veat
#{#datalevin/Datom [34 :role-perm/role 2]
#datalevin/Datom [33 :permission/tgt 32]
#datalevin/Datom [34 :role-perm/perm 33]},
:max-eid 34,
:max-tx 10,
:hash nil}
:datalevin.server/create
:datalevin.server/database)
2022-12-16T21:52:01.411Z dv-homebase ERROR [datalevin.server:2055] - Error Handling message: Unfreezable type: class org.lmdbjava.Env