Fork me on GitHub
#datomic
<
2020-10-24
>
Petrus Theron12:10:04

datomic-pro-1.0.6202 throws ActiveMQInternalErrorException when I try to create or connect to a Datomic DB:

clj
Clojure 1.10.1
user=> (require '[datomic.api :as d])
nil
user=> (d/connect "datomic:)
Execution error at datomic.peer/get-connection$fn (peer.clj:661).
Could not find newdb in catalog
user=> (d/create-database "datomic:)
Execution error (ActiveMQInternalErrorException) at org.apache.activemq.artemis.core.protocol.core.impl.ChannelImpl/sendBlocking (ChannelImpl.java:404).
null
I’ve tried with both Oracle JDK 15 and OpenJDK 15.

jaret13:10:20

I see you are connecting to the DB and then attempting to create the DB? Did this DB already exist or was it the product of a backup/restore? Did you recently upgrade to the new version of Datomic-pro? Or are you saying that this worked before you moved to JDK15? If so, what version were you previously running where this worked? I am going to go test with JDK 15 right now.

Nassin22:10:20

Datomic doesn't work with jdk15, your safest bet with datomic is java 8

👍 3
😢 3
jaret14:10:06

I've re-created the behavior and logged an anomaly for us to investigate further. In general, I am updating our docs to indicate that Datomic on-prem is tested to run against LTS versions of Java (8 and 11). @U051SPP9Z I agree with your assertion elsewhere that we should have a feature to detect when not on an LTS java version and throw a warning to move to one. I am looking at options for such a feature and logging a feature request for further investigation.

👍 3
Nassin18:10:46

FWIW, datomic 1.0.6202 with Java 11 throws some jackson reflection warnings

vncz14:10:34

Does anybody know if there's a relation between db's T value and the txInstant of an entity?

vncz14:10:13

Essentially I have a database and if I do (:t db) I get 7 as value. On the other hand, if I look for a txInstant for an entity via (def query '[:find ?tx :where [?e :person/id _ ?tx]]) I get very long number instead

vncz14:10:45

What I am trying to do is "Given a certain entity ID, what was the t that has introduced/updated it?

Lennart Buit15:10:20

Forgive me for not answering on ask, but this blog may interest you: https://observablehq.com/@favila/datomic-internals

vncz16:10:55

Oh sweet, let's check that out

vncz16:10:28

I can't find these functions in datomic.client.api :thinking_face:

vncz16:10:30

Where are them?

vncz18:10:21

These function seem to be in datomic.api but I can't find it anywhere on maven/clojars

Lennart Buit21:10:18

You can call datomic.api functions in your queries. Or you can at least on client + peer server

vncz21:10:02

@UDF11HLKC Ah ok so maybe it's only executed on the peer?

vncz21:10:30

I'm a bit confused, I can't find such namespace anywhere and it does not work when doing it in a query (d/q '[:find ?e ?tx ?t :where [?e :person/id _ ?tx] [((t->tx ?tx)) ?t]] db) which makes sense, since it even the docs says that the functions executed must be in the class path.

Alex Miller (Clojure team)14:10:10

This would be a great question to ask on the new forum https://ask.datomic.com

vncz14:10:59

Ah ok, I was not aware there was a specific forum

vncz18:10:21

These function seem to be in datomic.api but I can't find it anywhere on maven/clojars

vncz21:10:30

I'm a bit confused, I can't find such namespace anywhere and it does not work when doing it in a query (d/q '[:find ?e ?tx ?t :where [?e :person/id _ ?tx] [((t->tx ?tx)) ?t]] db) which makes sense, since it even the docs says that the functions executed must be in the class path.

vncz21:10:47

Oh ok I found it, it seems like it's in com.datomic/datomic-free

vncz22:10:44

And I got it working