datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
onetom 2020-10-24T04:45:09.146500Z

this bit me a few times initially. it would be very helpful to provide better error message for this situation.

1👍
Petrus Theron 2020-10-24T12:42:04.149Z

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=&gt; (d/connect "datomic:<dev://localhost:4334/newdb%22|dev://localhost:4334/newdb">)
Execution error at datomic.peer/get-connection$fn (peer.clj:661).
Could not find newdb in catalog
user=&gt; (d/create-database "datomic:<dev://localhost:4334/newdb%22|dev://localhost:4334/newdb">)
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.

jaret 2020-10-26T14:45:06.171400Z

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). @petrus 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.

1👍
Nassin 2020-10-26T18:14:46.177Z

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

jaret 2020-10-24T13:32:20.149100Z

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.

Petrus Theron 2020-10-24T13:47:20.149900Z

Full story here: https://stackoverflow.com/q/64512606/198927

jaret 2020-10-24T14:05:22.150200Z

Totally agree this seems to be a bug in using dev-local client and create DB. It should throw an error like in cloud for expected map. I've logged a bug and we'll look at fixing!

jaret 2020-10-24T14:06:07.150400Z

;Cloud client
(d/create-database client "testing")
Execution error (ExceptionInfo) at datomic.client.impl.shared/api-&gt;client-req (shared.clj:258).
Expected a map

;Dev local client
(d/create-database client "testing")
=&gt; true

jaret 2020-10-24T14:12:12.150600Z

in either case no DB is created, but we should throw an error in both cases!

vncz 2020-10-24T14:41:34.151300Z

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

vncz 2020-10-24T14:43:13.152800Z

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

vncz 2020-10-24T14:48:45.154100Z

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

alexmiller 2020-10-24T14:49:10.154900Z

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

vncz 2020-10-24T14:49:59.155300Z

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

alexmiller 2020-10-24T15:21:26.156Z

Just opened this week!

2020-10-24T15:48:36.156400Z

Thanks for all the help. Working as expected now.😀

2020-10-24T15:51:20.157200Z

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

vncz 2020-10-24T16:32:55.157700Z

Oh sweet, let's check that out

vncz 2020-10-24T16:32:58.157900Z

Thanks @lennart.buit

vncz 2020-10-24T16:44:28.158100Z

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

vncz 2020-10-24T16:44:30.158500Z

Where are them?

2020-10-24T18:06:31.158700Z

@jaret thanks for fixing it. Do you know if there is a light weight way to get datomic cloud consulting? I run into little blockers here and there and I would rather shell some money then get stuck for a day off someone can easily help me trouble shoot things.

jaret 2020-10-24T18:12:28.158900Z

@drewverlee I am going to tag @marshall on this. You can also e-mail him directly at <mailto:marshall@cognitect.com|marshall@cognitect.com>. He is running point on our Datomic consulting services along with a few other folks at Cognitect. I'll bring this up with him on Monday if you two don't connect here.

2020-10-24T21:03:18.160800Z

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

vncz 2020-10-24T21:19:02.161Z

@lennart.buit Ah ok so maybe it's only executed on the peer?

vncz 2020-10-24T21:49:47.161800Z

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

vncz 2020-10-24T22:00:44.162Z

And I got it working

vncz 2020-10-24T22:01:38.162200Z

1🙌
Nassin 2020-10-24T22:42:20.162500Z

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

1👍1😢