This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-08-05
Channels
- # announcements (1)
- # babashka (5)
- # beginners (151)
- # calva (43)
- # clj-kondo (23)
- # cljdoc (1)
- # cljs-dev (6)
- # cljsrn (10)
- # clojure (60)
- # clojure-australia (1)
- # clojure-europe (26)
- # clojure-gamedev (14)
- # clojure-nl (1)
- # clojure-spec (10)
- # clojure-uk (80)
- # clojurescript (66)
- # clojureverse-ops (4)
- # community-development (7)
- # conjure (8)
- # datomic (15)
- # deps-new (1)
- # docker (27)
- # emacs (2)
- # fulcro (13)
- # honeysql (13)
- # java (5)
- # jobs-discuss (43)
- # lsp (121)
- # luminus (13)
- # malli (1)
- # off-topic (73)
- # pathom (12)
- # polylith (29)
- # practicalli (4)
- # re-frame (35)
- # reagent (44)
- # remote-jobs (5)
- # rewrite-clj (2)
- # sci (7)
- # shadow-cljs (125)
- # sql (4)
- # tools-deps (9)
- # xtdb (5)
I did create the db with the transactor running, but now I’m getting this:
./bin/run -m datomic.peer-server -h localhost -p 8998 -a myaccesskey,mysecret -d humboi,"datomic:"
Execution error (ActiveMQNotConnectedException) at org.apache.activemq.artemis.core.client.impl.ServerLocatorImpl/createSessionFactory (ServerLocatorImpl.java:699).
AMQ219007: Cannot connect to server(s). Tried with all available servers.
Full report at:
/var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/clojure-5121092977512187181.edn
prikshetsharma@Prikshets-MacBook-Pro datomic-pro-1.0.6269 % nvim /var/folders/96/df02xppj77g7dx698gtmwmrw0000gn/T/clojure-5121092977512187181.edn
Full report:
https://gist.github.com/zendevil/d9f48df00fa243dfcea687f7f1a9d38cnot sure:
prikshetsharma@Prikshets-MacBook-Pro datomic-pro-1.0.6269 % java -version
java version "1.8.0_241"
Java(TM) SE Runtime Environment (build 1.8.0_241-b07)
Java HotSpot(TM) 64-Bit Server VM (build 25.241-b07, mixed mode)
java 8 I think
:sql: doesn’t work but :mem: does
I was running the transactor and the peer on the same port. Now it works
I’m wondering what is happening behind the scenes with this query throwing an Execution error (NullPointerException) at datomic.datalog/project (datalog.clj:702).:
(d/q '[:find ?b
:in $ ?range-start ?range-end
:where
[?b :entity/type :entity.type/booking]
(or-join [?b ?range-start ?range-end ?foobar]
(and [?b :booking/assignee ?me]
[?b :booking/actual-start-time ?booking-start]
[(>= ?booking-start ?range-start)]
[(< ?booking-start ?range-end)]))]
(db)
#inst"2020-01-01"
#inst"2022-01-01")
There’s a couple of obvious bugs, ?foobar
is not bound to anything and neither is ?me
, but the weird thing is that having the first two clauses inside the and
swapped does not crash. Does anyone know what’s different when they are the other way around?i.e. this works
(d/q '[:find ?b
:in $ ?range-start ?range-end
:where
[?b :entity/type :entity.type/booking]
(or-join [?b ?range-start ?range-end ?foobar]
(and [?b :booking/actual-start-time ?booking-start]
[?b :booking/assignee ?me]
[(>= ?booking-start ?range-start)]
[(< ?booking-start ?range-end)]))]
(db)
#inst"2020-01-01"
#inst"2022-01-01")
=> #{[17592186051383]}
and so does having the assignee a second time in the end
(d/q '[:find ?b
:in $ ?range-start ?range-end
:where
[?b :entity/type :entity.type/booking]
(or-join [?b ?range-start ?range-end ?foobar]
(and [?b :booking/assignee ?me]
[?b :booking/actual-start-time ?booking-start]
[(>= ?booking-start ?range-start)]
[(< ?booking-start ?range-end)]
[?b :booking/assignee ?me]))]
(db)
#inst"2020-01-01"
#inst"2022-01-01")
@U7PQLLK0S I'm not from datomic team but it feels like a bug. can you share which datomic version you are using, which kind of connection (mem/file/sql...), maybe the JVM version/release too.