datomic

Ask questions on the official Q&A site at https://ask.datomic.com!
arohner 2021-03-26T11:05:40.116400Z

on-prem should work just fine in Azure. Cloud most likely won’t

tatut 2021-03-26T13:17:59.116600Z

ok, so we should upgrade compute groups asap

2021-03-26T13:19:13.117400Z

Hi 👋:skin-tone-2: Just ran into this error using Datomic Analytics on premise using datomic 1.0.6269:

Query 20210326_131630_00006_px9te failed: No matching clause: :db.type/uri

Joe Lane 2021-03-26T13:20:10.117600Z

Yep

jaret 2021-03-26T13:44:20.117900Z

Hi @jeroen.dejong are you using the latest supported https://repo1.maven.org/maven2/io/prestosql/presto-cli/348/presto-cli-348-executable.jar I think? Or are you using another version? I want to make sure I track this so can you shoot an e-mail to <mailto:support@cognitect.com|support@cognitect.com>. I will make a case to investigate internally, but if it turns out we need to bump presto again as a type mapping changed I'd like to be able to keep you updated.

2021-03-26T13:45:11.118100Z

I'm using the bundled version of datomic 1.0.6269, I'll see which one that is.

2021-03-26T13:45:44.118800Z

presto:x&gt; SELECT node_version FROM system.runtime.nodes;
 node_version
--------------
 348
So I presumably, yes the latest version.

futuro 2021-03-26T13:52:16.122400Z

I'm using composite tuple attributes as a :db.unique/identity for an entity, and I've noticed that I need to transact the composite attributes along with the composite tuple form to get the upsert functionality. If I don't also transact the tuple, the attributes are first associated with a new EID and then an attempt is made to assert the composite tuple, which fails because it already belongs to another entity. Is this expected?

jaret 2021-03-26T14:08:25.122500Z

Nevermind! I am an idiot. I forgot that URI is an unsupported type in analytics.

2021-03-26T14:34:23.123Z

Aha! So this is expected behavior?

2021-03-26T20:03:33.130600Z

Can confirm. We run Datomic on-prem in Azure. Both peers and transactor as Azure Container Instances, with Postgresql as backend. Setup running in production since September 2020.

ccortes 2021-03-26T20:39:54.135800Z

Don't know if this is the right place to ask, but here it goes: I'm building an API using liberator and dotamic cloud. I'm trying to do some simple stuff but I can't create a connection with my datomic db, I have previously used the same db in a Luminus project and works perfectly fine. The ns where all my datomic functions are looks like this

(ns api.db.cloud-core
  (:require
   [datomic.client.api :as d]
   [mount.core :refer [defstate]]))

(defonce cfg {:server-type :ion
              :region "region"
              :system "system"
              :endpoint "url"
              :proxy-port 8182})

(defonce db-name {:db-name "name"})


(defstate conn
  :start (as-&gt; (d/client cfg) c
           (d/connect c db-name))
  :stop (-&gt; conn .release))
...
...
There's no issue when I run lein ring server , but when I make a request which hanndle function uses something from datomic I get the following error: java.lang.IllegalArgumentException: No implementation of method: :db of protocol: #'datomic.client.api.protocols/Connection found for class: mount.core.DerefableState So I change (defstate conn ... ) with just (def conn (d/connect (d/client cfg) db-name)) and now I can't even start the ring server. All I get is Syntax error (ClassNotFoundException) compiling at (cognitect/http_client.clj:1:1). org.eclipse.jetty.client.HttpClient I'm completly lost since I don't know whats causing this, apparently its a dependency conlifct but my project file looks like this:
(defproject api "0.1.0-SNAPSHOT"
  :description "FIXME: write description"
  :url "<http://example.com/FIXME>"
  :license {:name "EPL-2.0 OR GPL-2.0-or-later WITH Classpath-exception-2.0"
            :url "<https://www.eclipse.org/legal/epl-2.0/>"}
  :plugins [[lein-ring "0.12.5"]]
  :ring {:handler api.core/handler}
  :repositories {"<http://my.datomic.com|my.datomic.com>" {:url "<https://my.datomic.com/repo>"
                                   :creds :gpg}}
  :dependencies [[org.clojure/clojure "1.10.1"]
                 ;Database
                 [com.datomic/client-cloud "0.8.105"
                  :exclusions [org.eclipse.jetty/jetty-http
                               org.eclipse.jetty/jetty-util
                               org.eclipse.jetty/jetty-client
                               org.eclipse.jetty/jetty-io]]
                 [mount "0.1.16"]
                 [com.fasterxml.jackson.core/jackson-core "2.11.1"]
                 ;Partners
                 [buddy/buddy-hashers "1.4.0"]
                 [clj-http "3.12.0"]
                 [danlentz/clj-uuid "0.1.9"]
                 ;Liberator
                 [liberator "0.15.3"]
                 [compojure "1.6.2"]
                 [ring/ring-core "1.9.2"]
                 [ring/ring-json "0.5.0"]]
  :repl-options {:init-ns api.core})
Any tips on what should I do to connect succesfully to my db?

ghadi 2021-03-26T20:46:04.136700Z

the error says "class not found: org.eclipse.jetty.client.HttpClient" and the deps have a bunch of exclusions around org.eclipse.jetty

ghadi 2021-03-26T20:46:15.136900Z

porque the exclusions?

ghadi 2021-03-26T20:46:41.137100Z

those seem implicated

ccortes 2021-03-26T21:46:18.138800Z

I removed the exclusions but still get en error message Syntax error (ClassNotFoundException) compiling . at (cognitect/http_client.clj:92:19). org.eclipse.jetty.http.HttpCompliance

Joe Lane 2021-03-26T22:25:46.139200Z

Did you lein clean and rebuild your snapshot?