<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0">
<channel>
<title>Datomic Knowledgebase - Recent questions tagged datomic</title>
<link>https://ask.datomic.com/index.php/tag/datomic</link>
<description>Powered by Question2Answer</description>
<item>
<title>Datomic peer - Support SSO</title>
<link>https://ask.datomic.com/index.php/1885/datomic-peer-support-sso</link>
<description>&lt;p&gt;Datomic currently does not support AWS SSO out-of-the-box&lt;/p&gt;
&lt;p&gt;This issue is probably because it uses an old version of &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/operation/storage.html#dynamodb-aws-peer-dependency&quot;&gt;dynamodb SDK&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;I believe that this issue can be fixed by upgrading the AWS SDK to &lt;a rel=&quot;nofollow&quot; href=&quot;https://mvnrepository.com/artifact/software.amazon.awssdk/dynamodb/2.41.27&quot;&gt;v2&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Here a workaround:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://gist.github.com/souenzzo/42060567479ab2dd916769f1d73042fa&quot;&gt;https://gist.github.com/souenzzo/42060567479ab2dd916769f1d73042fa&lt;/a&gt;&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1885/datomic-peer-support-sso</guid>
<pubDate>Fri, 13 Feb 2026 17:36:46 +0000</pubDate>
</item>
<item>
<title>Datomic peer on dynamodb - misleading error message</title>
<link>https://ask.datomic.com/index.php/1884/datomic-peer-on-dynamodb-misleading-error-message</link>
<description>&lt;p&gt;Starting from a simple setup:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {com.datomic/peer       {:mvn/version &quot;1.0.7491&quot;}
        org.slf4j/slf4j-simple {:mvn/version &quot;2.0.17&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;And trying to connect into a dynamodb connection, it fails with a &quot;s3&quot; error: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;user=&amp;gt; (require '[datomic.api :as d])
nil
user=&amp;gt; (d/connect &quot;datomic:ddb://us-east-1/prd/db&quot;)
[main] INFO datomic.process-monitor - {:event :metrics/initializing, :metricsCallback clojure.core/identity, :phase :begin, :pid 311, :tid 3}
[main] INFO datomic.process-monitor - {:event :metrics/initializing, :metricsCallback clojure.core/identity, :msec 0.696, :phase :end, :pid 311, :tid 3}
[main] INFO datomic.process-monitor - {:metrics/started clojure.core/identity, :pid 311, :tid 3}
[clojure-agent-send-off-pool-0] INFO datomic.domain - {:event :cache/create, :cache-bytes 502267904, :pid 311, :tid 25}
[clojure-agent-send-off-pool-0] INFO datomic.process-monitor - {:AvailableMB 895.0, :ObjectCacheCount 0, :event :metrics, :pid 311, :tid 25}
Execution error (ClassNotFoundException) at jdk.internal.loader.BuiltinClassLoader/loadClass (BuiltinClassLoader.java:580).
com.amazonaws.services.s3.model.MultiObjectDeleteException
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;From this error message, it is pretty hard to find that datomic actually requires an extra dynamodb dependency to work.&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/operation/storage.html#dynamodb-aws-peer-dependency&quot;&gt;https://docs.datomic.com/operation/storage.html#dynamodb-aws-peer-dependency&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Possible fixes:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;A better error message&lt;/li&gt;
&lt;li&gt;Adding this error message to datomic docs, as a &quot;common errors&quot; - do google will be able to find. &lt;/li&gt;
&lt;/ul&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1884/datomic-peer-on-dynamodb-misleading-error-message</guid>
<pubDate>Fri, 13 Feb 2026 16:19:56 +0000</pubDate>
</item>
<item>
<title>Datomic on JDK25 - WARNING: A restricted method in java.lang.System has been called</title>
<link>https://ask.datomic.com/index.php/1883/datomic-jdk25-warning-restricted-method-java-system-called</link>
<description>&lt;p&gt;Using this dependencies&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {com.datomic/peer                    {:mvn/version &quot;1.0.7491&quot;}
        org.slf4j/slf4j-nop                 {:mvn/version &quot;2.0.17&quot;}
        com.amazonaws/aws-java-sdk-dynamodb {:mvn/version &quot;1.12.564&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note: aws-java-sdk-dynamodb has an updated version, but 1.12.564 is the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/operation/storage.html#dynamodb-aws-peer-dependency&quot;&gt;recommended&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Generate these warnings:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by io.netty.util.internal.PlatformDependent0$4 (file:/root/.m2/repository/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar)
WARNING: Please consider reporting this to the maintainers of class io.netty.util.internal.PlatformDependent0$4
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by io.netty.util.internal.NativeLibraryUtil in an unnamed module (file:/root/.m2/repository/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This issue report focus in the first part: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by io.netty.util.internal.NativeLibraryUtil in an unnamed module (file:/root/.m2/repository/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Trace:&lt;br&gt;
-  io.netty/netty-common 4.1.100&lt;br&gt;
- required by org.apache.activemq/artemis-commons 2.31.2&lt;br&gt;
- required by org.apache.activemq/artemis-core-client 2.31.2&lt;br&gt;
- required by com.datomic/peer.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1883/datomic-jdk25-warning-restricted-method-java-system-called</guid>
<pubDate>Fri, 13 Feb 2026 16:19:55 +0000</pubDate>
</item>
<item>
<title>Datomic on JDK25 - WARNING: A terminally deprecated method in sun.misc.Unsafe has been called</title>
<link>https://ask.datomic.com/index.php/1882/datomic-warning-terminally-deprecated-method-unsafe-called</link>
<description>&lt;p&gt;Using this dependencies&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps {com.datomic/peer                    {:mvn/version &quot;1.0.7491&quot;}
        org.slf4j/slf4j-nop                 {:mvn/version &quot;2.0.17&quot;}
        com.amazonaws/aws-java-sdk-dynamodb {:mvn/version &quot;1.12.564&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note: aws-java-sdk-dynamodb has an updated version, but 1.12.564 is the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/operation/storage.html#dynamodb-aws-peer-dependency&quot;&gt;recommended&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Generate these warnings:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by io.netty.util.internal.PlatformDependent0$4 (file:/root/.m2/repository/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar)
WARNING: Please consider reporting this to the maintainers of class io.netty.util.internal.PlatformDependent0$4
WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
WARNING: A restricted method in java.lang.System has been called
WARNING: java.lang.System::loadLibrary has been called by io.netty.util.internal.NativeLibraryUtil in an unnamed module (file:/root/.m2/repository/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar)
WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
WARNING: Restricted methods will be blocked in a future release unless native access is enabled
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This issue report focus in the first part: &lt;/p&gt;
&lt;pre&gt;&lt;code&gt;WARNING: A terminally deprecated method in sun.misc.Unsafe has been called
WARNING: sun.misc.Unsafe::objectFieldOffset has been called by io.netty.util.internal.PlatformDependent0$4 (file:/root/.m2/repository/io/netty/netty-common/4.1.100.Final/netty-common-4.1.100.Final.jar)
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Trace:&lt;br&gt;
-  io.netty/netty-common 4.1.100&lt;br&gt;
- required by org.apache.activemq/artemis-commons 2.31.2&lt;br&gt;
- required by org.apache.activemq/artemis-core-client 2.31.2&lt;br&gt;
- required by com.datomic/peer.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1882/datomic-warning-terminally-deprecated-method-unsafe-called</guid>
<pubDate>Fri, 13 Feb 2026 16:19:51 +0000</pubDate>
</item>
<item>
<title>Why does changing the #inst reader make my query fail?</title>
<link>https://ask.datomic.com/index.php/1867/why-does-changing-the-inst-reader-make-my-query-fail</link>
<description>&lt;p&gt;does datomic pro print and read queries during datomic.api/q, maybe as part of its query cache? we’ve changed the &lt;code&gt;#inst&lt;/code&gt; reader in our project to return java.time.Instant and now a java.util.Date we pass to a query comes out as a &lt;code&gt;java.time.Instant&lt;/code&gt;. Is that expected &amp;amp; documented somewhere?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[datomic.api])

;; this is demonstrating an issue we ran into where overwriting the
;; `#inst` reader broke `datomic.api/q` in surprising ways.

(def schema
  [{:db/ident :exit/datetime
    :db/valueType :db.type/instant
    :db/cardinality :db.cardinality/one}])

(def conn
  (datomic.api/connect (doto &quot;datomic:mem://inst-java-time-readers&quot; datomic.api/create-database)))

@(datomic.api/transact conn schema)

(def db+data
  (:db-after
   @(datomic.api/transact conn [{:exit/datetime #inst &quot;2024&quot;}
                                {:exit/datetime #inst &quot;2025&quot;}
                                {:exit/datetime #inst &quot;2026&quot;}])))

;; this works
(count (datomic.api/q [:find '?f
                       :where
                       '[?f :exit/datetime ?exit]
                       [(list '&amp;lt; '?exit (java.util.Date.))]]
                      db+data))


;; fails silently (returns incorrect number of results)
(binding [*data-readers* (assoc *data-readers* 'inst (fn [cs] (java.util.Date/.toInstant (clojure.instant/read-instant-date cs))))]
  (count (datomic.api/q [:find '?f
                         :where
                         '[?f :exit/datetime ?exit]
                         [(list '&amp;lt; '?exit (java.util.Date.))]]
                        db+data)))

;; fails loudly with processing rule: (q__124130 ?f), message:
;; processing clause: [?f :exit/datetime ?exit], message:
;; java.lang.ClassCastException: class java.time.Instant cannot be
;; cast to class java.util.Date (java.time.Instant and java.util.Date
;; are in module java.base of loader 'bootstrap')
(binding [*data-readers* (assoc *data-readers* 'inst (fn [cs] (java.util.Date/.toInstant (clojure.instant/read-instant-date cs))))]
  (count (datomic.api/q [:find '?f
                         :where
                         '[?f :exit/datetime ?exit]
                         [(list java.util.Date/.before '?exit (java.util.Date.))]]
                        db+data)))

;; My guess is that this is related to datomic's [query
;; caching](https://docs.datomic.com/query/query-executing.html#query-caching)
;; because once a query has been cached, a sucessive call with the
;; same query value and a bound #inst reader succeeds:
(let [query [:find '?f
             :where
             '[?f :exit/datetime ?exit]
             [(list java.util.Date/.before '?exit (java.util.Date.))]]]
  (= (count (datomic.api/q query db+data))
     (binding [*data-readers* (assoc *data-readers* 'inst (fn [cs] (java.util.Date/.toInstant (clojure.instant/read-instant-date cs))))]
       (count (datomic.api/q query db+data)))))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1867/why-does-changing-the-inst-reader-make-my-query-fail</guid>
<pubDate>Mon, 20 Oct 2025 17:21:00 +0000</pubDate>
</item>
<item>
<title>Why does Datomic store all databases in a single datomic_kvs table instead of having a separate table per database?</title>
<link>https://ask.datomic.com/index.php/1085/datomic-databases-datomickvs-instead-separate-database</link>
<description>&lt;p&gt;I am curious about the reasoning behind keeping all Datomic databases in a single datomic_kvs table rather than creating a separate table for each database.&lt;/p&gt;
&lt;p&gt;Some disadvantages of the current approach that I see:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;More complex maintenance: For example, if VACUUM FULL is needed because one database is highly active and generates a lot of garbage, it will block all Datomic databases, not just the affected one.&lt;/li&gt;
&lt;li&gt;Difficult to determine per-database segment size: Since the table contains entries for all databases, simply counting elements in datomic_kvs does not provide a per-database segment count.&lt;/li&gt;
&lt;li&gt;Database deletion requires a special utility: Instead of simply dropping a table, removing a database requires a dedicated tool.&lt;/li&gt;
&lt;li&gt;Disk space is not immediately freed: Because of the previous point, space is not reclaimed until VACUUM FULL is run, which again locks all Datomic databases.&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Given these limitations, what are the key advantages that justify using a single datomic_kvs table instead of separate tables per database?&lt;/p&gt;
&lt;p&gt;Also, is there any plan to introduce a mode where each Datomic database has its own separate table?&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1085/datomic-databases-datomickvs-instead-separate-database</guid>
<pubDate>Mon, 03 Mar 2025 17:06:33 +0000</pubDate>
</item>
<item>
<title>datomic's spymemcached fork collides with original</title>
<link>https://ask.datomic.com/index.php/1075/datomics-spymemcached-fork-collides-with-original</link>
<description>&lt;p&gt;Datomic seems to be shading spymemcached. The logger implementation of spymemcached uses the property &lt;code&gt;net.spy.log.LoggerImpl&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;Unfortunately that property wasn't shaded properly in datomic - the fork uses the naked property without a prefix. This means setting that property crashes either datomic startup or spymemcached startup, because the same class cannot be used in both places.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1075/datomics-spymemcached-fork-collides-with-original</guid>
<pubDate>Mon, 24 Feb 2025 19:02:52 +0000</pubDate>
</item>
<item>
<title>&quot;No suitable driver&quot; when starting peer</title>
<link>https://ask.datomic.com/index.php/1068/no-suitable-driver-when-starting-peer</link>
<description>&lt;p&gt;In the peer container:&lt;/p&gt;
&lt;p&gt;root@3249b8857f6f:/opt/datomic# bin/repl&lt;br&gt;
Clojure 1.11.4&lt;br&gt;
user=&amp;gt; (Class/forName &quot;org.postgresql.Driver&quot;)&lt;br&gt;
org.postgresql.Driver&lt;br&gt;
user=&amp;gt; (require 'datomic.peer-server)&lt;br&gt;
nil&lt;br&gt;
user=&amp;gt; (datomic.peer-server/-main&lt;br&gt;
  &quot;-h&quot; &quot;0.0.0.0&quot;&lt;br&gt;
  &quot;-p&quot; &quot;8998&quot;&lt;br&gt;
  &quot;-a&quot; &quot;none,none&quot;&lt;br&gt;
  &quot;-d&quot; &quot;datomic,datomic:sql://mydb?jdbc=postgresql://catalyst-postgres-1:5432/datomic?user=datomic&amp;amp;password=datomic&amp;amp;jdbc-class=org.postgresql.Driver&quot;)&lt;br&gt;
Execution error (SQLException) at java.sql.DriverManager/getDriver (DriverManager.java:299).&lt;br&gt;
No suitable driver&lt;br&gt;
user=&amp;gt; &lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1068/no-suitable-driver-when-starting-peer</guid>
<pubDate>Fri, 24 Jan 2025 01:10:09 +0000</pubDate>
</item>
<item>
<title>http-direct configuation not working as per tutorials</title>
<link>https://ask.datomic.com/index.php/1018/http-direct-configuation-not-working-as-per-tutorials</link>
<description>&lt;p&gt;I cannot get http-direct working.  The AWS configuration consoles have changed and the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/livetutorial/http-direct.html&quot;&gt;tutorial&lt;/a&gt; does not appear to work.&lt;/p&gt;
&lt;p&gt;Specifically: in the &lt;strong&gt;API Gateway-&amp;gt;APIs-&amp;gt;Create API&lt;/strong&gt; creation I appear to have to choose between HTTPapi or RESTapi.  Between the two, the tutorial appears to follow the REST Api route (before HTTP was an option apparently).  If I do that, the load balancer does not show up as an option.  The vpc links are created for either HTTP or REST.  There is not a LoadBalancer for REST.  &lt;/p&gt;
&lt;p&gt;I have been able to work through getting a request routed to the LoadBalancer with the preconfigured 8184 listener but I get a Ion excution failed and I'm too far off the tutorial to understand what I need.  &lt;/p&gt;
</description>
<category>Ions</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1018/http-direct-configuation-not-working-as-per-tutorials</guid>
<pubDate>Tue, 07 May 2024 19:17:52 +0000</pubDate>
</item>
<item>
<title>How to write the Metaschema file?</title>
<link>https://ask.datomic.com/index.php/1013/how-to-write-the-metaschema-file</link>
<description>&lt;p&gt;I'm learning the Analytics Support of Datomic Pro. I have configured the Transactor, Peer Server, and Presto Server and ensured that they can run properly.&lt;br&gt;
I am trying to use PrestoJDBC to query the content in the Datomic database through SQL statements. By reading the Datomic Pro documentation, I realized that I need to write a Metaschema file to implement this operation. But I didn't find any examples of Metasahema files on the internet.&lt;br&gt;
So I would like to seek help information related to Metaschema file examples.If I misunderstood, please point out my mistake!&lt;br&gt;
I really need your help in the short term!&lt;br&gt;
Thank you!&lt;/p&gt;
</description>
<category>Analytics</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1013/how-to-write-the-metaschema-file</guid>
<pubDate>Mon, 22 Apr 2024 09:54:04 +0000</pubDate>
</item>
<item>
<title>Possibly security issue with the dev H2 storage?</title>
<link>https://ask.datomic.com/index.php/1003/possibly-security-issue-with-the-dev-h2-storage</link>
<description>&lt;p&gt;While trying to understand more about the behaviour of Datomic dev (mainly from a security/encryption point of view), I attempted to connect to datomic.mv.db from an instance of the H2 console. I accidentally tried to log in as &quot;admin&quot; with a blank password and was surprised when I connected successfully. Connecting as &quot;admin&quot; with any password fails, so it seems explicitly to be blank. As far as I can tell I only have public  schema access and can't see any transacted data, but I am able to run SQL queries in the console.&lt;/p&gt;
&lt;p&gt;Clearly a dev transactor isn't intended to be high security, but admin with a blank password seems risky even for a dev environment. In most SQL environments I work with, the sa/admin account is just disabled if not used. Am I missing something?&lt;/p&gt;
&lt;p&gt;As an aside, does the dev transactor use H2's AES encryption or is the resulting data file unencrypted?&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/1003/possibly-security-issue-with-the-dev-h2-storage</guid>
<pubDate>Wed, 13 Mar 2024 21:58:26 +0000</pubDate>
</item>
<item>
<title>import-cloud fails with &quot;No reader function for tag object&quot;</title>
<link>https://ask.datomic.com/index.php/999/import-cloud-fails-with-no-reader-function-for-tag-object</link>
<description>&lt;p&gt;The recent release of version 1.0.277 of datomic-local allowed me to run &lt;code&gt;import-cloud&lt;/code&gt; to completion successfully.  Unfortunately, the resulting database is unusable.  When I try to connect, I get this error message:&lt;/p&gt;
&lt;blockquote&gt;&lt;p&gt;{:type java.lang.RuntimeException&lt;br&gt;
   :message &quot;No reader function for tag object&quot;&lt;br&gt;
   :at [clojure.lang.EdnReader$TaggedReader readTagged &quot;EdnReader.java&quot; 801]}]&lt;br&gt;
 :trace&lt;br&gt;
 [[clojure.lang.EdnReader$TaggedReader readTagged &quot;EdnReader.java&quot; 801]&lt;br&gt;
  [clojure.lang.EdnReader$TaggedReader invoke &quot;EdnReader.java&quot; 783]&lt;br&gt;
  [clojure.lang.EdnReader$DispatchReader invoke &quot;EdnReader.java&quot; 549]&lt;br&gt;
  [clojure.lang.EdnReader readDelimitedList &quot;EdnReader.java&quot; 757]&lt;br&gt;
  [clojure.lang.EdnReader$MapReader invoke &quot;EdnReader.java&quot; 680]&lt;br&gt;
  [clojure.lang.EdnReader readDelimitedList &quot;EdnReader.java&quot; 757]&lt;br&gt;
  [clojure.lang.EdnReader$MapReader invoke &quot;EdnReader.java&quot; 680]&lt;br&gt;
  [clojure.lang.EdnReader readDelimitedList &quot;EdnReader.java&quot; 757]&lt;br&gt;
  [clojure.lang.EdnReader$VectorReader invoke &quot;EdnReader.java&quot; 672]&lt;br&gt;
  [clojure.lang.EdnReader readDelimitedList &quot;EdnReader.java&quot; 757]&lt;br&gt;
  [clojure.lang.EdnReader$MapReader invoke &quot;EdnReader.java&quot; 680]&lt;br&gt;
  [clojure.lang.EdnReader read &quot;EdnReader.java&quot; 145]&lt;br&gt;
  [clojure.lang.EdnReader read &quot;EdnReader.java&quot; 111]&lt;br&gt;
  [clojure.lang.EdnReader readString &quot;EdnReader.java&quot; 67]&lt;br&gt;
  [clojure.edn$read_string invokeStatic &quot;edn.clj&quot; 46]&lt;br&gt;
  [clojure.edn$read_string invokeStatic &quot;edn.clj&quot; 37]&lt;br&gt;
  [clojure.edn$read_string invoke &quot;edn.clj&quot; 37]&lt;br&gt;
  [datomic.dev_local.btindex_set$read_latest_root invokeStatic &quot;btindex_set.clj&quot; 99]&lt;br&gt;
  [datomic.dev_local.btindex_set$read_latest_root invoke &quot;btindex_set.clj&quot; 95]&lt;br&gt;
  [datomic.dev_local.btindex_set$current_index_files invokeStatic &quot;btindex_set.clj&quot; 149]&lt;br&gt;
  [datomic.dev_local.btindex_set$current_index_files invoke &quot;btindex_set.clj&quot; 146]&lt;br&gt;
  [datomic.dev_local.btindex_set$old_index_files invokeStatic &quot;btindex_set.clj&quot; 159]&lt;br&gt;
  [datomic.dev_local.btindex_set$old_index_files invoke &quot;btindex_set.clj&quot; 156]&lt;br&gt;
  [datomic.dev_local.btindex_set$delete_old_index_files invokeStatic &quot;btindex_set.clj&quot; 176]&lt;br&gt;
  [datomic.dev_local.btindex_set$delete_old_index_files invoke &quot;btindex_set.clj&quot; 169]&lt;br&gt;
  [datomic.dev_local.btindex_db$delete_unused_files invokeStatic &quot;btindex_db.clj&quot; 604]&lt;br&gt;
  [datomic.dev_local.btindex_db$delete_unused_files invoke &quot;btindex_db.clj&quot; 602]&lt;br&gt;
  [datomic.dev_local.impl$create_durable_connection invokeStatic &quot;impl.clj&quot; 189]&lt;br&gt;
  [datomic.dev_local.impl$create_durable_connection invoke &quot;impl.clj&quot; 187]&lt;br&gt;
  [datomic.dev_local.impl$create_connection invokeStatic &quot;impl.clj&quot; 205]&lt;br&gt;
  [datomic.dev_local.impl$create_connection invoke &quot;impl.clj&quot; 201]&lt;br&gt;
  [datomic.dev_local.impl.DurableClient connect &quot;impl.clj&quot; 271]&lt;br&gt;
  [datomic.client.api$connect invokeStatic &quot;api.clj&quot; 151]&lt;br&gt;
  [datomic.client.api$connect invoke &quot;api.clj&quot; 138]&lt;br&gt;
  [st.system$ensure_db_BANG_ invokeStatic &quot;system.clj&quot; 117]&lt;br&gt;
  [st.system$ensure_db_BANG_ invoke &quot;system.clj&quot; 114]&lt;br&gt;
  [st.system$eval57307$fn__57309$fn__57311 invoke &quot;system.clj&quot; 122]&lt;br&gt;
  [clojure.core$mapv$fn__8535 invoke &quot;core.clj&quot; 6979]&lt;br&gt;
...&lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Note that I use a custom credentials provider and it appears as an opaque java object in the resulting db-root-00000000 file.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/999/import-cloud-fails-with-no-reader-function-for-tag-object</guid>
<pubDate>Wed, 14 Feb 2024 18:08:30 +0000</pubDate>
</item>
<item>
<title>Are DB values obtained from a single conn guaranteed to include transactions submitted against the same connection?</title>
<link>https://ask.datomic.com/index.php/983/obtained-guaranteed-include-transactions-submitted-connection</link>
<description>&lt;p&gt;It stands to reason that all transactions submitted (via &lt;code&gt;datomic.api/transact&lt;/code&gt;) and transacted (demonstrated via &lt;code&gt;deref&lt;/code&gt;) on a single peer would be included in all subsequent DB values obtained (via &lt;code&gt;datomic.api/db&lt;/code&gt;) on the Peer, but I'd love to know if that is &lt;em&gt;guaranteed&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;For example, if a test transacts data resulting in some &lt;em&gt;T&lt;/em&gt;, and the rest of the test only cares that it runs against a DB value with &lt;em&gt;T'&lt;/em&gt; &amp;gt;= &lt;em&gt;T&lt;/em&gt;, is the following sufficient?:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;@(datomic.api/transact conn tx) ; T
(let [db' (datomic.api/db conn)] ; T' &amp;gt;= T?
,,(do-something-with db')&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Or is it strictly necessary to do:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;(let [{:keys [db-after]} @(datomic.api/transact conn tx)]
,,(do-something-with db-after))&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;I know that the former &lt;em&gt;tends&lt;/em&gt; to work, but I'm particularly interested if it's &lt;em&gt;guaranteed to work&lt;/em&gt;.&lt;/p&gt;
&lt;p&gt;I do understand that additional transactions from other threads / clients / etc. may have been included in &lt;code&gt;db'&lt;/code&gt; in the first scenario, so I realize the code is not equivalent in the general case. I'm only concerned about &lt;code&gt;tx&lt;/code&gt; having been transacted and included in the fetched &lt;code&gt;db'&lt;/code&gt; value.&lt;/p&gt;
&lt;p&gt;Thank you!&lt;/p&gt;
&lt;p&gt;(Apologies for formatting—I can't seem to convince this thing to care about my whitespace.)&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/983/obtained-guaranteed-include-transactions-submitted-connection</guid>
<pubDate>Wed, 31 Jan 2024 05:03:55 +0000</pubDate>
</item>
<item>
<title>Equivalents for d/with; transaction function test scaffold story when using cloud</title>
<link>https://ask.datomic.com/index.php/949/equivalents-transaction-function-scaffold-story-using-cloud</link>
<description>&lt;p&gt;Is there absolutely no way to access the peer api on datomic cloud?&lt;/p&gt;
&lt;p&gt;My thinking is that, conceptually, since it uses clients, that implies that peer servers do exist.&lt;/p&gt;
&lt;p&gt;I realise that light horizontal scaling is the point in DC, but the peer api, and in particular &lt;code&gt;d/with&lt;/code&gt; I'm finding important to allow test scaffolds for transaction functions.&lt;/p&gt;
&lt;p&gt;So the thought here is it would be nice to be able to access the richer peer api just for one off tasks, such as managing schema or even here making speculative databases so one can create a test scaffold to test a more complex transaction function.&lt;/p&gt;
&lt;p&gt;I don't know what the test scaffold story is with DC or if there is one. Bit of a dark area on the map for me at the moment so any suggestions would be appreciated. &lt;/p&gt;
&lt;p&gt;I guess one last-resort option is to develop using Pro and test transaction functions that way. Then copy them over to DC. I have found though that in a previous iteration trying to think about Pro and Cloud at the same time as designing for your domain is something I would want to avoid where possible.&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Update: I've just realised that the client api does actually include d/with, but I'll leave the question up anyway, in case anyone has any related thoughts they'd like to share.&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Further Update: looking back at my initial inept attempts to build a datomic system and schema which utilised transaction functions to avoid race conditions given a complex content hierarchy in the domain I am modelling, it looks like the reason I felt forced to use the Peer API and not Client, for those Database Functions, was the absence of d/function in the Client API. I wonder if Client API actually is fully capable in terms of installing and testing database functions, but that wasn't clear to me at the time. So much is required to be able to develop in Datomic. It might be that my missing a little detail of Clojure/Java design (an easy syntactic alternative to d/function?) ended up pushing my design decision in an unnecessary direction. &lt;br&gt;
I suppose the answer may be, re. DB functions - &quot;Client API yes&quot;, &quot;Cloud no&quot;?&lt;br&gt;
(Illustrating the point that it is best not to try to think about Pro and Cloud at the same time...)&lt;/em&gt;&lt;/p&gt;
&lt;p&gt;&lt;em&gt;Remaining question: I'm finding it very difficult to find out what the difference is between d/function on the peer API, vs. use of the #db/fn literal.  Cannot locate an explanation in the docs. GPT is telling me the latter is for an inline database function which will not be installed, whereas d/function is for installing the fn into the database, but it I know it could be hallucinating in such a case.&lt;/em&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/949/equivalents-transaction-function-scaffold-story-using-cloud</guid>
<pubDate>Wed, 01 Nov 2023 11:24:08 +0000</pubDate>
</item>
<item>
<title>Why do values of :db.type/uri return as com.cognitect.transit.impl.URIImpl?</title>
<link>https://ask.datomic.com/index.php/943/why-values-type-uri-return-com-cognitect-transit-impl-uriimpl</link>
<description>&lt;p&gt;I've recently worked with dev-local try out Datomic and when I moved to Cloud I noticed the following scenario, whenever I transact a fact that is of the &lt;code&gt;java.net.URI&lt;/code&gt; type and try to query it back I get &lt;code&gt;com.cognitect.transit.impl.URIImpl&lt;/code&gt; back as the type, I have found no documentation about this, I was expecting that the types remain the same, is there any way to disable this behavior or at least convert back to &lt;code&gt;java.net.URI&lt;/code&gt;?&lt;/p&gt;
&lt;p&gt;This matters because I had some code break because it was expecting &lt;code&gt;java.net.URI&lt;/code&gt; and because this behavior is undocumented (or if documented inaccessible by searching the Datomic documentation and search engines)&lt;/p&gt;
&lt;p&gt;Thank you for your time&lt;/p&gt;
&lt;hr&gt;
&lt;p&gt;&lt;code&gt;deps.edn&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;org.clojure/clojure {:mvn/version &quot;1.11.1&quot;}
com.datomic/client-cloud {:mvn/version &quot;1.0.123&quot;}
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/943/why-values-type-uri-return-com-cognitect-transit-impl-uriimpl</guid>
<pubDate>Mon, 02 Oct 2023 03:56:45 +0000</pubDate>
</item>
<item>
<title>Why is this error message saying the entity can't be resolved?</title>
<link>https://ask.datomic.com/index.php/897/why-is-this-error-message-saying-the-entity-cant-be-resolved</link>
<description>&lt;p&gt;Here is the error message:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cognitect.anomalies/message: &quot;Unable to resolve entity: 1.7592186046217E13 in datom [\&quot;shape_VVVVVVVVVVVVVVVV_0_1\&quot; :shape/source-shape 1.7592186046217E13]&quot;
                           datom: [&quot;shape_VVVVVVVVVVVVVVVV_0_1&quot; :shape/source-shape 1.7592186046217E13]
                        db/error: :db.error/not-an-entity
                             dbs: [{:database-id
                                    &quot;datomic:dev://datomic-transactor:4334/blah&quot;,
                                    :t 1818,
                                    :next-t 1819,
                                    :history false}]
                          entity: 1.7592186046217E13
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;I can query for the :db/id 17592186046217, so I know it exists. My question is why can't Datomic find it? There's only one transaction and it failed, so it is guaranteed that entity 17592186046217 existed before the transaction as well.&lt;/p&gt;
&lt;p&gt;This is the schema for &lt;code&gt;:shape/source-shape&lt;/code&gt;:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:db/ident :shape/source-shape
 :db/valueType :db.type/ref  
 :db/cardinality :db.cardinality/one}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;The version of Datomic is &lt;code&gt;datomic-pro-1.0.6269&lt;/code&gt;.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/897/why-is-this-error-message-saying-the-entity-cant-be-resolved</guid>
<pubDate>Thu, 04 May 2023 22:53:42 +0000</pubDate>
</item>
<item>
<title>What defines a datomic on-prem system?</title>
<link>https://ask.datomic.com/index.php/883/what-defines-a-datomic-on-prem-system</link>
<description>&lt;p&gt;The price for an on-prem pro license is for one system. What defines a system? Does a single system include a transactor, a stand-by transactor and multiple peers?&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/883/what-defines-a-datomic-on-prem-system</guid>
<pubDate>Wed, 29 Mar 2023 20:55:33 +0000</pubDate>
</item>
<item>
<title>Request Entity Too Large - clojure.lang.ExceptionInfo: Response body did not conform to Datomic client protocol</title>
<link>https://ask.datomic.com/index.php/882/request-clojure-exceptioninfo-response-conform-protocol</link>
<description>&lt;p&gt;There seems to be a bug in Datomic 990-9202 that breaks the d/tx-range function.&lt;/p&gt;
&lt;p&gt;Earlier I could use the tx-range function the fetch data from my database.&lt;/p&gt;
&lt;p&gt;But after upgrading to Datomic 990-9202 I get and exception when a transaction has too much data. &lt;/p&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
clojure.lang.ExceptionInfo: Response body did not conform to Datomic client protocol&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;cognitect.anomalies/category: :cognitect.anomalies/incorrect
 cognitect.anomalies/message: &quot;Response body did not conform to Datomic client protocol&quot;
                 http-result: {:status 413,
                               :headers
                               {&quot;apigw-requestid&quot; &quot;Vg4UxisCDoEEJsQ=&quot;,
                                &quot;server&quot; &quot;Jetty(9.4.44.v20210927)&quot;,
                                &quot;connection&quot; &quot;keep-alive&quot;,
                                &quot;content-length&quot; &quot;38&quot;,
                                &quot;date&quot; &quot;Tue, 19 Jul 2022 12:17:47 GMT&quot;,
                                &quot;content-type&quot; &quot;application/json&quot;},
                               :body &quot;{\&quot;message\&quot;:\&quot;Request Entity Too Large\&quot;}&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/882/request-clojure-exceptioninfo-response-conform-protocol</guid>
<pubDate>Tue, 21 Mar 2023 12:26:20 +0000</pubDate>
</item>
<item>
<title>Error connecting to datomic cloud</title>
<link>https://ask.datomic.com/index.php/861/error-connecting-to-datomic-cloud</link>
<description>&lt;p&gt;I'm trying to connect with the datomic cloud, but when I connect with the client I get the following error:&lt;br&gt;
Execution error (NoClassDefFoundError) at com.amazonaws.services.s3.AmazonS3ClientBuilder/standard (AmazonS3ClientBuilder.java:46).&lt;br&gt;
Could not initialize class com.amazonaws.services.s3.S3CredentialsProviderChain&lt;/p&gt;
</description>
<category>Client API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/861/error-connecting-to-datomic-cloud</guid>
<pubDate>Mon, 12 Dec 2022 00:30:29 +0000</pubDate>
</item>
<item>
<title>How do you add relationship properties, e.g. the time a person met another person?</title>
<link>https://ask.datomic.com/index.php/854/how-you-relationship-properties-time-person-another-person</link>
<description>&lt;p&gt;I have some experience with Neo4j / cypher. In cypher relationships are first-class citizens, so they can have properties, which I really like.&lt;/p&gt;
&lt;p&gt;How do I do something similar with datalog? Do I have to have a &quot;mapping entity&quot; in between two entities that have a relationship?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/854/how-you-relationship-properties-time-person-another-person</guid>
<pubDate>Mon, 07 Nov 2022 08:35:28 +0000</pubDate>
</item>
<item>
<title>Hi guys, I need to retrieve id's from all users in database that are older then 30 days, every user has creation date.</title>
<link>https://ask.datomic.com/index.php/728/retrieve-users-database-that-older-days-every-user-creation</link>
<description>&lt;p&gt;Hi guys,&lt;br&gt;
I need to retrieve id's from all users in database that are older then 30 days, every user has creation date.,&lt;br&gt;
(let [conn (client/get-conn)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;  db (client/db)
  last-month (t/minus (t/now) (t/month 1))
  q '{:find  [(pull ?eid [*])]
      :where [[?eid :user/created]]}]
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;  ;;.............&lt;br&gt;
  )&lt;br&gt;
I have last-month #inst date, I just dont know how to get all users &quot;older&quot; then 30 days.&lt;br&gt;
I am new in datomic so,&lt;br&gt;
if someone can help, thank you in advance...&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/728/retrieve-users-database-that-older-days-every-user-creation</guid>
<pubDate>Mon, 01 Aug 2022 22:13:08 +0000</pubDate>
</item>
<item>
<title>How to add new entities (as references) to the many attribute of an existing entity?</title>
<link>https://ask.datomic.com/index.php/726/how-add-entities-references-many-attribute-existing-entity</link>
<description>&lt;p&gt;By way of example I'm going to use a drawing as the existing entity which is to have two new shapes added to it. This is the tx that is failing:&lt;br&gt;
&lt;code&gt;[{:shape/id &quot;BKF806TXXTAFWII0&quot;, :db/id &quot;22NF08ZVGH9N7QGG_0&quot;}
 {:shape/id &quot;YKIZU4CJC0JXJKVQ&quot;, :db/id &quot;22NF08ZVGH9N7QGG_1&quot;}
 [:db/add 17592186047451 :drawing/shapes [&quot;22NF08ZVGH9N7QGG_0&quot; &quot;22NF08ZVGH9N7QGG_1&quot;]]]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;As you can see the existing drawing has &lt;code&gt;:db/id&lt;/code&gt; of 17592186047451. I'm trying to create two new shapes and add them to the many cardinality attribute &lt;code&gt;:drawing/shapes&lt;/code&gt;. &quot;22NF08ZVGH9N7QGG_0&quot; and &quot;22NF08ZVGH9N7QGG_1&quot; are tempids that are supposed to be translated to the same new &lt;code&gt;:db/id&lt;/code&gt;s wherever they appear.&lt;/p&gt;
&lt;p&gt;I should say that the drawing doesn't have any existing shapes. If it did I would expect them to be orphaned.&lt;/p&gt;
&lt;p&gt;This is the error message I'm getting:&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).&lt;br&gt;
Cannot interpret as a keyword: 22NF08ZVGH9N7QGG_0, no leading :&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Something similar I've also tried:&lt;br&gt;
&lt;code&gt;[{:shape/id &quot;9HTL5BMMHT6QUJM6&quot;, :db/id &quot;22NF08ZVGH9N7QGG_0&quot;}
 {:shape/id &quot;O5UB9IG9UB8KDVA2&quot;, :db/id &quot;22NF08ZVGH9N7QGG_1&quot;}
 [:db/add 17592186047451 :drawing/shapes &quot;22NF08ZVGH9N7QGG_0&quot;]
 [:db/add 17592186047451 :drawing/shapes &quot;22NF08ZVGH9N7QGG_1&quot;]]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Gives this error message:&lt;br&gt;
&lt;strong&gt;Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).&lt;br&gt;
Two datoms in the same transaction conflict&lt;br&gt;
{:d1&lt;br&gt;
 [17592186047451 :drawing/shapes 17592186049126 13194139538021 true],&lt;br&gt;
 :d2&lt;br&gt;
 [17592186047451 :drawing/shapes 17592186049127 13194139538021 true]}&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;This gives the same error message as the first attempt:&lt;br&gt;
&lt;code&gt;[{:db/id 17592186047451, :drawing/shapes [&quot;22NF08ZVGH9N7QGG_0&quot; &quot;22NF08ZVGH9N7QGG_1&quot;]}
 {:shape/id &quot;3DZYWHEPQIAELF25&quot;, :db/id &quot;22NF08ZVGH9N7QGG_0&quot;}
 {:shape/id &quot;GJ804SOOU36YQX6Y&quot;, :db/id &quot;22NF08ZVGH9N7QGG_1&quot;}]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Getting rid of the tempids by doing it in a nested way:&lt;br&gt;
&lt;code&gt;[{:db/id 17592186047451,
  :drawing/shapes
  [{:shape/id &quot;GEMRMRFG0E6N262M&quot;}
   {:shape/id &quot;HTH2C7R90BQFFNXT&quot;}]}]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Just yields this error message:&lt;br&gt;
&lt;strong&gt;Execution error (ExceptionInfo) at datomic.client.api.async/ares (async.clj:58).&lt;br&gt;
Unable to resolve entity: {:shape/id &quot;GEMRMRFG0E6N262M&quot;}&lt;/strong&gt;&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/726/how-add-entities-references-many-attribute-existing-entity</guid>
<pubDate>Wed, 27 Jul 2022 19:01:04 +0000</pubDate>
</item>
<item>
<title>java.lang.IllegalArgumentException: Cannot resolve key: 24a96e20-f526-4f7f-ba38-4f684caa5607</title>
<link>https://ask.datomic.com/index.php/720/illegalargumentexception-resolve-24a96e20-4f684caa5607</link>
<description>&lt;p&gt;I am trying to implement resursive rule (loglcal OR) by following this video - Lucas Cavalcanti &amp;amp; Edward Wible - Exploring four hidden superpowers of Datomic&lt;/p&gt;
&lt;p&gt;Here the code&lt;/p&gt;
&lt;p&gt;(defn owns? [cid pid db]&lt;br&gt;
  (d/q '{:find [?pur]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;     :in [$ ?cus-id ?pur %]
     :where
     [(owns? ?cus-id ?pur)]}
db cid [:purchase/id pid] owner-rules))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(comment&lt;br&gt;
  (owns?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#uuid &quot;0fb7ea94-44af-46fa-98ca-0ddb5eb23123&quot;
#uuid &quot;24a96e20-f526-4f7f-ba38-4f684caa5607&quot;
(d/db bank-conn)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;While running the above example I am getting this error: &lt;br&gt;
java.lang.IllegalArgumentException Cannot resolve key: 24a96e20-f526-4f7f-ba38-4f684caa5607&lt;/p&gt;
&lt;p&gt;Here is the full code:&lt;/p&gt;
&lt;p&gt;(def purchase-schema&lt;br&gt;
  [{:db/ident :purchase/id&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:db/doc &quot;The purchase ID&quot;
:db/unique :db.unique/identity
:db/valueType :db.type/uuid
:db/cardinality :db.cardinality/one}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   {:db/ident :purchase/account&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:db/doc &quot;Purchase Account&quot;
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(def account-schema&lt;br&gt;
  [{:db/ident :account/id&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:db/doc &quot;The Account ID&quot;
:db/unique :db.unique/identity
:db/valueType :db.type/uuid
:db/cardinality :db.cardinality/one}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   {:db/ident :account/customer&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:db/doc &quot;Customer who own's this account&quot;
:db/valueType :db.type/ref
:db/cardinality :db.cardinality/one}])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(def customer-schema&lt;br&gt;
  [{:db/ident :customer/id&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:db/doc &quot;Customer ID&quot;
:db/unique :db.unique/identity
:db/valueType :db.type/uuid
:db/cardinality :db.cardinality/one}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;   {:db/ident :customer/name&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;:db/doc &quot;Customer name&quot;
:db/valueType :db.type/string
:db/cardinality :db.cardinality/one}])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;;;&lt;br&gt;
;; Create client&lt;br&gt;
(def client (d/client {:server-type :dev-local&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                   :system &quot;dev&quot;}))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;;; Create connections&lt;br&gt;
(def bank-conn    (d/connect client {:db-name &quot;bank&quot;}))&lt;/p&gt;
&lt;p&gt;;; Transact schemas&lt;br&gt;
(comment&lt;br&gt;
  (d/transact  bank-conn {:tx-data purchase-schema})&lt;br&gt;
  (d/transact  bank-conn {:tx-data account-schema})&lt;br&gt;
  (d/transact  bank-conn {:tx-data customer-schema})&lt;br&gt;
  (d/tx-range  bank-conn {:start 6}))&lt;/p&gt;
&lt;p&gt;(comment&lt;br&gt;
  (java.util.UUID/randomUUID))&lt;/p&gt;
&lt;p&gt;;; Transact fake data&lt;br&gt;
(def cid #uuid &quot;0fb7ea94-44af-46fa-98ca-0ddb5eb23123&quot;)&lt;br&gt;
(def sample-customer {:customer/id cid&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                  :customer/name &quot;Jon Snow&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(def aid #uuid &quot;c579a9f6-f6c3-4718-8ecf-c3003021ee9a&quot;)&lt;br&gt;
(def sample-account {:account/id aid&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                 :account/customer [:customer/id cid]})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(def pid #uuid &quot;24a96e20-f526-4f7f-ba38-4f684caa5607&quot;)&lt;br&gt;
(def sample-purchase {:purchase/id  pid&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;                  :purchase/account [:account/id aid]})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(comment&lt;br&gt;
  (d/transact bank-conn {:tx-data [sample-customer]})&lt;br&gt;
  (d/transact bank-conn {:tx-data [sample-account]})&lt;br&gt;
  (d/transact bank-conn {:tx-data [sample-purchase]}))&lt;/p&gt;
&lt;p&gt;(comment&lt;br&gt;
  (d/q '[:find ?cus&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;     :in $ ?cid ?pid
     :where
     [?pur :purchase/id ?pid]
     [?pur :purchase/account ?acc]
     [?acc :account/customer ?cus]
     [?cus :customer/id ?cid]]
  (d/db bank-conn)
  (:customer/id sample-customer)
  (:purchase/id sample-purchase)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;;; owns v1&lt;br&gt;
(defn ownsv1? [cid pid db]&lt;br&gt;
  (d/q '[:find ?cus&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;     :in $ ?customer-id ?purchase-id
     :where
     [?pur :purchase/id ?purchase-id]
     [?pur :purchase/account ?acc]
     [?acc :account/customer ?cus]
     [?cus :customer/id ?customer-id]]
db cid pid))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(comment&lt;br&gt;
  (ownsv1?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(:customer/id sample-customer)
(:purchase/id sample-purchase)
(d/db bank-conn)))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;;; recursive rule (logical OR)&lt;br&gt;
(def owner-rules&lt;br&gt;
  '[[(owns? ?cus-id ?e)&lt;/p&gt;
&lt;pre&gt;&lt;code&gt; [?e :customer/id ?cus-id]]
[(owns? ?cus-id ?e)
 [?e ?ref-attr ?r]
 (owns? ?cus-id ?r)]])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;(defn owns? [cid pid db]&lt;br&gt;
  (d/q '{:find [?pur]&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;     :in [$ ?cus-id ?pur %]
     :where
     [(owns? ?cus-id ?pur)]}
db cid [:purchase/id pid] owner-rules))
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;;;&lt;br&gt;
(comment&lt;br&gt;
  (owns?&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(:customer/id sample-customer)
(:purchase/id sample-purchase)
(d/db bank-conn)))
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Client API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/720/illegalargumentexception-resolve-24a96e20-4f684caa5607</guid>
<pubDate>Mon, 06 Jun 2022 19:37:30 +0000</pubDate>
</item>
<item>
<title>Transactor timeout on transaction function throw</title>
<link>https://ask.datomic.com/index.php/718/transactor-timeout-on-transaction-function-throw</link>
<description>&lt;h3&gt;Version&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/datomic-pro &quot;1.0.6242&quot;&lt;/li&gt;
&lt;li&gt;transactor process 0.9.6045&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Given the following transaction function definition:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/transact
 *conn*
 [{:db/ident :demo-throw-fn
   :db/fn (d/function
           {:lang &quot;clojure&quot;
            :params '[db]
            :code '(throw (ex-info &quot;demo&quot; {:type (type #{:one})}))})}])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Execute the transaction function in two environments:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A local environment&lt;/li&gt;
&lt;li&gt;An environment where the transactor runs in a separate process&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Expectation&lt;/h3&gt;
&lt;p&gt;Regardless of the environment, transaction function runtime errors are thrown.&lt;/p&gt;
&lt;h3&gt;Actual&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;In a local environment, execution of the demo function indeed throws an error - in line with expectations.&lt;/li&gt;
&lt;li&gt;In an environment where the transactor runs in a separate process, the transactor times out.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Additional Notes&lt;/h3&gt;
&lt;p&gt;The &lt;em&gt;hypothesis&lt;/em&gt; for the timeout is a second error occurs due to the&lt;br&gt;
&lt;code&gt;(type #{:one})&lt;/code&gt; expression's result not being serializable. Unfortunately, the timeout error does not reveal what was likely known at some point during execution.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/718/transactor-timeout-on-transaction-function-throw</guid>
<pubDate>Fri, 27 May 2022 17:54:06 +0000</pubDate>
</item>
<item>
<title>Inconsistent return value using set?</title>
<link>https://ask.datomic.com/index.php/717/inconsistent-return-value-using-set</link>
<description>&lt;h3&gt;Version&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/datomic-pro &quot;1.0.6242&quot;&lt;/li&gt;
&lt;li&gt;transactor process 0.9.6045&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Setup&lt;/h3&gt;
&lt;p&gt;Given the following transaction function definition.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/transact
 *conn*
 [{:db/ident :demo-fn
   :db/fn (d/function
           {:lang &quot;clojure&quot;
            :params '[db]
            :code '(set? #{:one})})}])
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Execute the transaction function in two environments:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;A local environment&lt;/li&gt;
&lt;li&gt;An environment where the transactor runs in a separate process&lt;/li&gt;
&lt;/ol&gt;
&lt;h3&gt;Expectation&lt;/h3&gt;
&lt;p&gt;Regardless of the environment, the return value of &lt;code&gt;set?&lt;/code&gt; is consistent.&lt;/p&gt;
&lt;h3&gt;Actual&lt;/h3&gt;
&lt;ul&gt;
&lt;li&gt;In a local environment, the function returns &lt;code&gt;true&lt;/code&gt; - as expected.&lt;/li&gt;
&lt;li&gt;In an environment where the transactor runs in a separate process, the function returns &lt;code&gt;false&lt;/code&gt;.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;Additional Notes&lt;/h3&gt;
&lt;p&gt;The data type of a set is different in the two environments,&lt;br&gt;
&lt;code&gt;clojure.lang.PersistentHashSet&lt;/code&gt; in local and &lt;code&gt;java.util.HashSet&lt;/code&gt; in the other.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/717/inconsistent-return-value-using-set</guid>
<pubDate>Fri, 27 May 2022 17:51:40 +0000</pubDate>
</item>
<item>
<title>Remove com.h2database/h2 from classpath</title>
<link>https://ask.datomic.com/index.php/701/remove-com-h2database-h2-from-classpath</link>
<description>&lt;p&gt;When running Datomic on the Postgres storage, we wanted to exclude H2 from the Peer classpath, but this turns out not to be possible.&lt;/p&gt;
&lt;p&gt;With the following deps.edn&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;{:deps      {com.datomic/datomic-pro   {:mvn/version &quot;1.0.6362&quot;
                                        :exclusions  [com.h2database/h2]}
             org.postgresql/postgresql {:mvn/version &quot;42.3.1&quot;}}
 :mvn/repos {&quot;my.datomic.com&quot; {:url &quot;https://my.datomic.com/repo&quot;}}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;trying to create the database leads to&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/create-database &quot;datomic:sql://test?jdbc:postgresql://localhost:5432/datomic?user=datomic&quot;)
Execution error (ClassNotFoundException) at java.net.URLClassLoader/findClass (URLClassLoader.java:387).
org.h2.tools.Server
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Is there another way to accomplish this? &lt;/p&gt;
&lt;p&gt;The reason we want to exclude h2 from the classpath is because the maven artifact for h2 has several HIGH CVEs reported on it (&lt;a rel=&quot;nofollow&quot; href=&quot;https://mvnrepository.com/artifact/com.h2database/h2/1.3.172&quot;&gt;https://mvnrepository.com/artifact/com.h2database/h2/1.3.172&lt;/a&gt;). I understand that Datomic does not run the H2 console and is also does not involve SQLXML, so it is probably not vulnerable to the specific CVEs, however, it would be an easy way to remove a dev-only dependency in a production deployment.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/701/remove-com-h2database-h2-from-classpath</guid>
<pubDate>Tue, 01 Feb 2022 15:36:23 +0000</pubDate>
</item>
<item>
<title>Retrieving tx from a entity - attribute pair without doing a query on history db</title>
<link>https://ask.datomic.com/index.php/693/retrieving-from-entity-attribute-without-doing-query-history</link>
<description>&lt;p&gt;Given an entity and one of its attributes, is there a way to see the tx that added it without doing a query on history db?&lt;/p&gt;
&lt;p&gt;i.e. something other than&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/q
       '[:find ?tx ?attr ?val ?added
         :in $ ?e
         :where
         [?e ?attr ?val ?tx ?added]]
       (d/history my-db)
       my-eid)
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/693/retrieving-from-entity-attribute-without-doing-query-history</guid>
<pubDate>Fri, 07 Jan 2022 10:09:22 +0000</pubDate>
</item>
<item>
<title>How to retract entities that reference a retracted entity</title>
<link>https://ask.datomic.com/index.php/692/how-to-retract-entities-that-reference-a-retracted-entity</link>
<description>&lt;p&gt;In my database model, I have several entities referencing the user entity.&lt;br&gt;
When I retract the user entity using :db/retractEntity, the user is correctly retracted, as well as its refs in the other entities, for example :message/user.&lt;br&gt;
For some entities, when the user is retracted the entity itself should also be retracted, but since the entity is not a component of the user, as the relation is the other way around, I did not find a way to retract the entire entity.&lt;br&gt;
Is there a way to make this happen for some entities?&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/692/how-to-retract-entities-that-reference-a-retracted-entity</guid>
<pubDate>Thu, 06 Jan 2022 09:52:00 +0000</pubDate>
</item>
<item>
<title>Can I run recent versions of Datomic in Windows?</title>
<link>https://ask.datomic.com/index.php/662/can-i-run-recent-versions-of-datomic-in-windows</link>
<description>&lt;p&gt;I'm not sure if Windows is (or ever was?) a supported platform for Datomic On-Prem, but at the moment when I try to start a REPL, transactor, or peer server in any recent version I get:&lt;/p&gt;
&lt;p&gt;&quot;The input line is too long. The syntax of the command is incorrect.&quot;&lt;/p&gt;
&lt;p&gt;My Datomic path is short (C:\Datomic). I'm guessing the error results from classpath.cmd trying to build a CP_LIST that comprises all 400+ files in lib, though this behaviour is consistent as far back as 0.9.5927, which only has 240 jars in lib; things work as expected in 0.9.5786 (which has 232 jars) and earlier.&lt;/p&gt;
&lt;p&gt;I'd rather not use WSL/Docker etc. at this time - can anyone advise if there's a native solution that will allow me to use a version more recent than 2018?&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/662/can-i-run-recent-versions-of-datomic-in-windows</guid>
<pubDate>Tue, 31 Aug 2021 23:31:45 +0000</pubDate>
</item>
<item>
<title>Retracting entities, including tuples with refs</title>
<link>https://ask.datomic.com/index.php/660/retracting-entities-including-tuples-with-refs</link>
<description>&lt;p&gt;In my schema I have attributes of type tuple that has :db.type/ref as one of the tuple's types.&lt;br&gt;
My usecase is maintaining a set of ordered to-many relations.&lt;/p&gt;
&lt;p&gt;When I retract an entity using :db/retractEntity, the tuple attrs that refer to the retracted entity still remain, continuing to refer to a now non-existent entity.&lt;br&gt;
I'm not sure whether this is the intended behaviour, and if so, what would be a standard approach to clean up these tuples? My intention would be for these tuples to be completely redacted. As I'm using this in a cardinality-many setup, I'd expect the attribute to retain all tuple values, except the one that does include the ref to the retracted entity in any position.&lt;br&gt;
Should I be writing a custom retractEntity-like transaction function?&lt;br&gt;
Thanks!&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/660/retracting-entities-including-tuples-with-refs</guid>
<pubDate>Tue, 31 Aug 2021 13:36:44 +0000</pubDate>
</item>
<item>
<title>`Unable to read keyfile` error when trying to initialize Datomic Cloud with Client API</title>
<link>https://ask.datomic.com/index.php/653/unable-keyfile-error-trying-initialize-datomic-cloud-client</link>
<description>&lt;p&gt;Howdy all.&lt;/p&gt;
&lt;p&gt;I'm testing setting up Datomic Cloud using an IntelliJ IDE. I'm following the Client API tut from Datomic but am stuck initializing the client. &lt;/p&gt;
&lt;p&gt;The spec from an API client is &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/client-api/datomic.client.api.async.html#var-client&quot;&gt;here&lt;/a&gt;, and the tut is &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/tutorial/client.html&quot;&gt;here&lt;/a&gt;, under the step Using Datomic Cloud.&lt;/p&gt;
&lt;p&gt;So the tut says to init a client like so:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(require '[datomic.client.api :as d])
(def cfg {:server-type :ion
      :region &quot;&amp;lt;your AWS Region&amp;gt;&quot; ;; e.g. us-east-1
      :system &quot;&amp;lt;system name&amp;gt;&quot;
      :creds-profile &quot;&amp;lt;your_aws_profile_if_not_using_the_default&amp;gt;&quot;
      :endpoint &quot;&amp;lt;your endpoint&amp;gt;&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;They say to include an AWS profile if not using the default. I am using the default as far as I know--I'm not part of an org in AWS. &lt;/p&gt;
&lt;p&gt;This is the (partially redacted) code from my tutorial.core namespace, where I'm trying to init Datomic:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(ns tutorial.core   
(:gen-class))
(require '[datomic.client.api :as d])
(def cfg {:server-type :cloud
      :region &quot;us-east-2&quot;
      :system &quot;roam&quot;
      :endpoint &quot;https://API_ID.execute-api.us-east-2.amazonaws.com&quot;
      })
(def client (d/client cfg))
(d/create-database client {:db-name &quot;blocks&quot;})
(d/connect client {:db-name &quot;blocks&quot;})
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;However, I'm getting an error from Datomic like: &lt;code&gt;Forbidden to read keyfile at s3://URL/roam/datomic/access/admin/.keys. Make sure that your endpoint is correct, and that your ambient AWS credentials allow you to GetObject on the keyfile.&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;Do I need some sort of credential? Could anything else be causing this error? I got the endpoint URL from the ClientApiGatewayEndpoint in my CloudFormation Datomic stack. &lt;/p&gt;
&lt;p&gt;Please let me know if I should provide more info! Thanks. &lt;/p&gt;
</description>
<category>Client API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/653/unable-keyfile-error-trying-initialize-datomic-cloud-client</guid>
<pubDate>Mon, 23 Aug 2021 13:25:08 +0000</pubDate>
</item>
<item>
<title>Query values for more than one entity in a single datomic query (Roam Alpha Api)</title>
<link>https://ask.datomic.com/index.php/640/query-values-more-than-entity-single-datomic-query-roam-alpha</link>
<description>&lt;p&gt;I'd like to in a single datomic/datalog query get output relating to multiple entities&lt;/p&gt;
&lt;p&gt;E.g. &lt;/p&gt;
&lt;p&gt;In my db (querying Roam graph via RoamAlphaApi) for one value (&lt;code&gt;&quot;YjpbFUsTx&quot;&lt;/code&gt;) I can do this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;[:find ?e ?stri :where [?e :block/uid &quot;YjpbFUsTx&quot;][?e :block/string ?stri]]&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;gives me&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/IJMejXk.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;But I want to pass on two values &lt;code&gt;&quot;YjpbFUsTx&quot;&lt;/code&gt; and &lt;code&gt;&quot;TgpgOssBM&quot;&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;to give me&lt;/p&gt;
&lt;p&gt;&lt;img src=&quot;https://i.imgur.com/H6FzU4u.png&quot; alt=&quot;&quot;&gt;&lt;/p&gt;
&lt;p&gt;How do I do that? &lt;/p&gt;
&lt;p&gt;I've tried several variations but none give any output.&lt;/p&gt;
&lt;p&gt;Useful reference: &lt;a rel=&quot;nofollow&quot; href=&quot;https://www.zsolt.blog/2021/01/Roam-Data-Structure-Query.html&quot;&gt;https://www.zsolt.blog/2021/01/Roam-Data-Structure-Query.html&lt;/a&gt; .  &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/640/query-values-more-than-entity-single-datomic-query-roam-alpha</guid>
<pubDate>Sat, 26 Jun 2021 19:47:35 +0000</pubDate>
</item>
<item>
<title>ClassCastException, d/with  inside transact function</title>
<link>https://ask.datomic.com/index.php/638/classcastexception-d-with-inside-transact-function</link>
<description>&lt;p&gt;Calling a transaction function that uses d/with in a dev-local, filesystem (i.e., not :storage-dir :mem) throws a ClassCastException on internal Datomic code.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/dev-local {:mvn/version &quot;0.9.232&quot;}&lt;/li&gt;
&lt;li&gt;client-cloud 0.8.105&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Example with exception using file system dev-local.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client (d/client {:server-type :dev-local
                         :storage-dir &quot;/tmp/cce-bug3&quot;
                         :system      &quot;test&quot;}))
=&amp;gt; #'user/client
(d/create-database client {:db-name &quot;test&quot;})
=&amp;gt; true
(def conn (d/connect client {:db-name &quot;test&quot;}))
=&amp;gt; #'user/conn
(d/transact conn {:tx-data [{:db/ident       :user/name
                               :db/valueType   :db.type/string
                               :db/cardinality :db.cardinality/one}]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;test&quot;,
                                :basisT 5,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;test&quot;,
                               :basisT 6,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533318 50 #inst&quot;2021-05-09T00:49:46.400-00:00&quot; 13194139533318 true]
           #datom[73 10 :user/name 13194139533318 true]
           #datom[73 40 23 13194139533318 true]
           #datom[73 41 35 13194139533318 true]
           #datom[0 13 73 13194139533318 true]],
 :tempids {}}
(defn my-tx-fn
    [db argm]
    (let [tx-report (d/with db {:tx-data [{:user/name &quot;asd&quot;}]})]
      []))
=&amp;gt; #'user/my-tx-fn
(d/transact conn {:tx-data [(list 'user/my-tx-fn {})]})
Execution error (ClassCastException) at datomic.dev-local.tx/datom-lookup-valfn (tx.clj:397).
class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Working memdb example.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(def client-memdb (d/client {:server-type :dev-local
                               :storage-dir :mem
                               :system      &quot;test&quot;}))
=&amp;gt; #'user/client-memdb
(d/create-database client-memdb {:db-name &quot;test&quot;})
=&amp;gt; true
(def conn-memdb (d/connect client-memdb {:db-name &quot;test&quot;}))
=&amp;gt; #'user/conn-memdb
(d/transact conn-memdb {:tx-data [{:db/ident       :user/name
                                     :db/valueType   :db.type/string
                                     :db/cardinality :db.cardinality/one}]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                                :basisT 5,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                               :basisT 6,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533318 50 #inst&quot;2021-05-09T01:02:57.965-00:00&quot; 13194139533318 true]
           #datom[73 10 :user/name 13194139533318 true]
           #datom[73 40 23 13194139533318 true]
           #datom[73 41 35 13194139533318 true]
           #datom[0 13 73 13194139533318 true]],
 :tempids {}}
(d/transact conn-memdb {:tx-data [(list 'user/my-tx-fn {})]})
=&amp;gt;
{:db-before #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                                :basisT 6,
                                :indexBasisT 0,
                                :index-root-id nil,
                                :asOfT nil,
                                :sinceT nil,
                                :raw nil},
 :db-after #datomic.core.db.Db{:id &quot;394c7a65-bfeb-4dd4-b188-7aecd2057692&quot;,
                               :basisT 7,
                               :indexBasisT 0,
                               :index-root-id nil,
                               :asOfT nil,
                               :sinceT nil,
                               :raw nil},
 :tx-data [#datom[13194139533319 50 #inst&quot;2021-05-09T01:03:08.042-00:00&quot; 13194139533319 true]],
 :tempids {}}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expectation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Transaction functions that use d/with do not throw a ClassCastException. Additionally, the behavior of d/with in all Datomic environments (Cloud, File system, Memdb) is consistent. Given a &lt;a rel=&quot;nofollow&quot; href=&quot;https://forum.datomic.com/t/datomic-cloud-589-8846/1328&quot;&gt;previous Datomic Cloud release&lt;/a&gt; fixed a problem with using with-db from an Ion, it seems using d/with in a transaction function is a supported behavior.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The final d/transact transaction function throws a ClassCastException when using d/with on some internal Datomic code. This only occurs when using a dev-local, file system environment.&lt;/p&gt;
&lt;p&gt;Full stacktrace is pasted below.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#error{:cause &quot;class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')&quot;,
       :via [{:type java.lang.ClassCastException,
              :message &quot;class datomic.core.db.Datum cannot be cast to class java.lang.Number (datomic.core.db.Datum is in unnamed module of loader 'app'; java.lang.Number is in module java.base of loader 'bootstrap')&quot;,
              :at [datomic.dev_local.tx$datom_lookup_valfn invokeStatic &quot;tx.clj&quot; 397]}],
       :trace [[datomic.dev_local.tx$datom_lookup_valfn invokeStatic &quot;tx.clj&quot; 397]
               [datomic.dev_local.tx$datom_lookup_valfn invoke &quot;tx.clj&quot; 397]
               [datomic.dev_local.local_log.LocalLog valAt &quot;local_log.clj&quot; 56]
               [clojure.lang.RT get &quot;RT.java&quot; 760]
               [datomic.dev_local.btindex.BTIndex cons &quot;btindex.clj&quot; 281]
               [clojure.lang.RT conj &quot;RT.java&quot; 677]
               [clojure.core$conj__5390 invokeStatic &quot;core.clj&quot; 85]
               [clojure.core$conj__5390 invoke &quot;core.clj&quot; 82]
               [datomic.core.db.Db addData &quot;db.clj&quot; 2322]
               [datomic.core.db$add_ensured_data invokeStatic &quot;db.clj&quot; 3353]
               [datomic.core.db$add_ensured_data invoke &quot;db.clj&quot; 3351]
               [datomic.core.db$with_tx invokeStatic &quot;db.clj&quot; 3370]
               [datomic.core.db$with_tx invoke &quot;db.clj&quot; 3357]
               [datomic.core.db.Db with &quot;db.clj&quot; 2164]
               [datomic.core.local_db$fn__25633 invokeStatic &quot;local_db.clj&quot; 67]
               [datomic.core.local_db$fn__25633 invoke &quot;local_db.clj&quot; 24]
               [datomic.client.api.protocols$fn__11959$G__11877__11966 invoke &quot;protocols.clj&quot; 126]
               [datomic.client.api$with invokeStatic &quot;api.clj&quot; 363]
               [datomic.client.api$with invoke &quot;api.clj&quot; 353]
               [user$my_tx_fn invokeStatic &quot;user.clj&quot; 3]
               [user$my_tx_fn invoke &quot;user.clj&quot; 20]
               [clojure.lang.AFn applyToHelper &quot;AFn.java&quot; 156]
               [clojure.lang.AFn applyTo &quot;AFn.java&quot; 144]
               [clojure.lang.Var applyTo &quot;Var.java&quot; 705]
               [clojure.core$apply invokeStatic &quot;core.clj&quot; 667]
               [clojure.core$apply invoke &quot;core.clj&quot; 660]
               [datomic.core.db.ProcessExpander inject &quot;db.clj&quot; 3229]
               [datomic.core.db.ProcessInpoint inject &quot;db.clj&quot; 2950]
               [datomic.dev_local.btindex_db$expand_tx$inject_all__18586$fn__18587 invoke &quot;btindex_db.clj&quot; 440]
               [clojure.lang.PersistentVector reduce &quot;PersistentVector.java&quot; 343]
               [clojure.core$reduce invokeStatic &quot;core.clj&quot; 6827]
               [clojure.core$reduce invoke &quot;core.clj&quot; 6810]
               [datomic.dev_local.btindex_db$expand_tx$inject_all__18586 invoke &quot;btindex_db.clj&quot; 440]
               [datomic.dev_local.btindex_db$expand_tx invokeStatic &quot;btindex_db.clj&quot; 444]
               [datomic.dev_local.btindex_db$expand_tx invoke &quot;btindex_db.clj&quot; 429]
               [datomic.dev_local.btindex_db$with_tx invokeStatic &quot;btindex_db.clj&quot; 468]
               [datomic.dev_local.btindex_db$with_tx invoke &quot;btindex_db.clj&quot; 461]
               [datomic.dev_local.impl.DurableConnection transact &quot;impl.clj&quot; 161]
               [datomic.client.api$transact invokeStatic &quot;api.clj&quot; 200]
               [datomic.client.api$transact invoke &quot;api.clj&quot; 183]
               [user$eval124260 invokeStatic &quot;user.clj&quot; 25]
               [user$eval124260 invoke &quot;user.clj&quot; 25]
               [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7177]
               [clojure.lang.Compiler eval &quot;Compiler.java&quot; 7132]
               [clojure.core$eval invokeStatic &quot;core.clj&quot; 3214]
               [clojure.core$eval invoke &quot;core.clj&quot; 3210]
               [nrepl.middleware.interruptible_eval$evaluate$fn__959 invoke &quot;interruptible_eval.clj&quot; 91]
               [clojure.main$repl$read_eval_print__9086$fn__9089 invoke &quot;main.clj&quot; 437]
               [clojure.main$repl$read_eval_print__9086 invoke &quot;main.clj&quot; 437]
               [clojure.main$repl$fn__9095 invoke &quot;main.clj&quot; 458]
               [clojure.main$repl invokeStatic &quot;main.clj&quot; 458]
               [clojure.main$repl doInvoke &quot;main.clj&quot; 368]
               [clojure.lang.RestFn invoke &quot;RestFn.java&quot; 1523]
               [nrepl.middleware.interruptible_eval$evaluate invokeStatic &quot;interruptible_eval.clj&quot; 84]
               [nrepl.middleware.interruptible_eval$evaluate invoke &quot;interruptible_eval.clj&quot; 56]
               [nrepl.middleware.interruptible_eval$interruptible_eval$fn__985$fn__989
                invoke
                &quot;interruptible_eval.clj&quot;
                155]
               [clojure.lang.AFn run &quot;AFn.java&quot; 22]
               [nrepl.middleware.session$session_exec$main_loop__1086$fn__1090 invoke &quot;session.clj&quot; 190]
               [nrepl.middleware.session$session_exec$main_loop__1086 invoke &quot;session.clj&quot; 189]
               [clojure.lang.AFn run &quot;AFn.java&quot; 22]
               [java.lang.Thread run &quot;Thread.java&quot; 829]]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The previously pasted example is reproducible and always throws a ClassCastException.  &lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;We are unable to test functionality in a consistent manner. Local setups using dev-local file systems will not function as expected. Developers are unable to test features in the same way they will work in production.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/638/classcastexception-d-with-inside-transact-function</guid>
<pubDate>Thu, 24 Jun 2021 14:57:51 +0000</pubDate>
</item>
<item>
<title>d/client external server communication</title>
<link>https://ask.datomic.com/index.php/637/d-client-external-server-communication</link>
<description>&lt;p&gt;&lt;strong&gt;Environment&lt;/strong&gt;&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;com.datomic/client-cloud 0.8.105&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;&lt;strong&gt;History&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Get the docstring for &lt;code&gt;d/client&lt;/code&gt;.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(clojure.repl/doc d/client)
-------------------------
datomic.client.api/client
([arg-map])
  Create a client for a Datomic system. This function does not
communicate with a server and returns immediately.

For a cloud system, arg-map requires:

  :server-type   - :cloud
  :region        - AWS region, e.g. &quot;us-east-1&quot;
  :system        - your system name
  :endpoint      - IP address of your system or query group

Optionally, a cloud system arg-map accepts:

  :creds-provider  - instance of com.amazonaws.auth.AWSCredentialsProvider. Defaults to DefaultAWSCredentialsProviderChain
  :creds-profile   - name of an AWS Named Profile. See http://docs.aws.amazon.com/cli/latest/userguide/cli-multiple-profiles.html
  :proxy-port      - local port for SSH tunnel to bastion 

  Note: :creds-provider and :creds-profile are mutually exclusive, providing both will result in an error.

For a dev-local system, arg-map comprises:

  :server-type   - :dev-local (required)
  :system        - a system name (required)
  :storage-dir   - optional, overrides :storage-dir in ~/.datomic/dev-local.edn

dev-local stores databases under ${storage-dir}/${system}/${db-name}.

For a peer-server system, arg-map requires:

  :server-type   - :peer-server
  :access-key    - access-key from peer server launch
  :secret        - secret from peer server launch
  :endpoint      - peer server host:port
  :validate-hostnames  - false

Returns a client object.
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;Note the second sentence in the docstring: &quot;This function does not communicate with a server and returns immediately.&quot; Next call &lt;code&gt;d/client&lt;/code&gt; with an endpoint that does not exist.&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;(d/client {:server-type :ion
             :system      &quot;my-system&quot;
             :endpoint    &quot;http://i-dont-exist.datomic.net:8182&quot;
             :region      &quot;us-west-2&quot;})
Execution error (ExceptionInfo) at datomic.client.impl.cloud/get-s3-auth-path (cloud.clj:179).
Unable to connect to http://i-dont-exist.datomic.net:8182
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;strong&gt;Expectation&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;d/client&lt;/code&gt; does not communicate with a server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Actual&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;Calling &lt;code&gt;d/client&lt;/code&gt; does communicate with a server.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Evidence&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The above reproducible example indicates the &lt;code&gt;d/client&lt;/code&gt; function call is attempted to communicate the the passing in &lt;code&gt;:endpoint&lt;/code&gt; string given the exception thrown.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Impact&lt;/strong&gt;&lt;/p&gt;
&lt;p&gt;The &lt;code&gt;d/client&lt;/code&gt; docstring misleads the user by saying no server communication will occur when it does occur. The result is calls to &lt;code&gt;d/client&lt;/code&gt; can fail in unexpected ways when an external server communication is not accounted for. For example, we spin up Datomic Cloud query groups dynamically and attempt to communicate with the newly spun up cluster. Until the cluster is up and healthy, we expect calls to fail at &lt;code&gt;d/connect&lt;/code&gt; with an unavailable anomaly, and instead the calls would fail at &lt;code&gt;d/client&lt;/code&gt; with an unavailable anomaly.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/637/d-client-external-server-communication</guid>
<pubDate>Thu, 24 Jun 2021 14:55:59 +0000</pubDate>
</item>
<item>
<title>DDB size reduction after restore</title>
<link>https://ask.datomic.com/index.php/618/ddb-size-reduction-after-restore</link>
<description>&lt;p&gt;Hello. We have a large datomic database (15B datoms, 20TB DDB size). We have done a backup and a restore as a test and the resulting DDB is 500GB in size. Is this expected? A couple of datom count queries match on both databases, but the reduction from 20TB to 500GB still look a bit scary&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/618/ddb-size-reduction-after-restore</guid>
<pubDate>Tue, 25 May 2021 09:19:36 +0000</pubDate>
</item>
<item>
<title>Should you cache d/connect calls?</title>
<link>https://ask.datomic.com/index.php/569/should-you-cache-d-connect-calls</link>
<description>&lt;p&gt;Is it a best practice to cache the result of calls to &lt;code&gt;d/connect&lt;/code&gt;, as seen in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://github.com/Datomic/ion-event-example/blob/bfda1aa8f2a75f8c6f0dfd1ca468de19944c9591/src/datomic/ion/event_example.clj#L67&quot;&gt;Ion event-example ns&lt;/a&gt;? What are the trade-offs with not doing so?&lt;/p&gt;
</description>
<category>Client API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/569/should-you-cache-d-connect-calls</guid>
<pubDate>Wed, 06 Jan 2021 03:21:16 +0000</pubDate>
</item>
<item>
<title>Add default :timeout to client api ns docstring</title>
<link>https://ask.datomic.com/index.php/563/add-default-timeout-to-client-api-ns-docstring</link>
<description>&lt;p&gt;It'd be great to have the default value for &lt;code&gt;:timeout&lt;/code&gt; (60000) included in the &lt;code&gt;datomic.client.api&lt;/code&gt; ns docstring. Currently this value can only be found in the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/client/client-api.html#timeouts&quot;&gt;docs on the website&lt;/a&gt;. As of client-cloud 0.8.102, the ns docstring specifies the default value for &lt;code&gt;:limit&lt;/code&gt;. &lt;/p&gt;
</description>
<category>Client API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/563/add-default-timeout-to-client-api-ns-docstring</guid>
<pubDate>Thu, 24 Dec 2020 00:12:44 +0000</pubDate>
</item>
<item>
<title>Can you use d/with inside a Cloud transaction function?</title>
<link>https://ask.datomic.com/index.php/557/can-you-use-d-with-inside-a-cloud-transaction-function</link>
<description>&lt;p&gt;Can you use d/with inside a Cloud transaction function? It's not clear from the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/transactions/transaction-functions.html&quot;&gt;the docs&lt;/a&gt; if the db passed to the tx fn is one created by d/with-db.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/557/can-you-use-d-with-inside-a-cloud-transaction-function</guid>
<pubDate>Tue, 15 Dec 2020 16:58:24 +0000</pubDate>
</item>
<item>
<title>Does deleting a database permanently remove all data stored in said database?</title>
<link>https://ask.datomic.com/index.php/550/does-deleting-database-permanently-remove-stored-database</link>
<description>&lt;p&gt;Does calling &lt;code&gt;d/delete-database&lt;/code&gt; permanently remove all data stored in that database (historical or otherwise)? &lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/550/does-deleting-database-permanently-remove-stored-database</guid>
<pubDate>Fri, 04 Dec 2020 17:43:04 +0000</pubDate>
</item>
<item>
<title>How do I remove a unique tuple constraint?</title>
<link>https://ask.datomic.com/index.php/523/how-do-i-remove-a-unique-tuple-constraint</link>
<description>&lt;p&gt;I have a tuple constraint as follows:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;#:db{:id 182,
 :ident :ps2st/product-set+style-tier,
 :valueType :db.type/tuple,
 :cardinality :db.cardinality/one,
 :unique :db.unique/identity,
 :tupleAttrs [:ps2st/product-set :ps2st/style-tier]}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This constraint is overly restrictive. I read somewhere that tupleAttrs can not be altered, so I'd like to remove the constraint instead and then create a new one with more tuple attrs.&lt;/p&gt;
&lt;p&gt;How can I delete a constraint?&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/523/how-do-i-remove-a-unique-tuple-constraint</guid>
<pubDate>Fri, 20 Nov 2020 21:12:31 +0000</pubDate>
</item>
<item>
<title>Datomic cloud client get-s3-auth-path: Unable to connect to localhost:8182</title>
<link>https://ask.datomic.com/index.php/521/datomic-cloud-client-auth-path-unable-connect-localhost-8182</link>
<description>&lt;p&gt;I could use some help debugging recent connection issues we're having with&lt;br&gt;
a Datomic cloud solo topology. We were working to add analytics support so enabled it in Cloud&lt;br&gt;
Formation, added and synced a config directory and adjusted our internal AWS&lt;br&gt;
subaccounts to access via IAM roles.&lt;/p&gt;
&lt;p&gt;After this we're unable to establish a connection through the client even though&lt;br&gt;
it seems like all of the parts are working and wired up. I tried some&lt;br&gt;
&lt;a rel=&quot;nofollow&quot; href=&quot;https://clojurians-log.clojureverse.org/datomic/2020-07-01&quot;&gt;debugging by Google&lt;/a&gt; &lt;br&gt;
and tried the suggestions of restarting the worker and gateway nodes but&lt;br&gt;
unfortunately that didn't help.&lt;/p&gt;
&lt;p&gt;If anyone could provide pointers to what to poke or try next to re-establish&lt;br&gt;
authentication. it would be much appreciated.&lt;/p&gt;
&lt;p&gt;Now all the details, first we successfully connect to the access Gateway:&lt;br&gt;
&lt;code&gt;`&lt;/code&gt;&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ datomic client access -r us-east-2 datomic-solo
OpenSSH_7.6p1 Ubuntu-4ubuntu0.3, OpenSSL 1.0.2n  7 Dec 2017
[...]
debug1: Authentication succeeded (publickey).
Authenticated to 18.216.250.130 ([18.216.250.130]:22).
debug1: Local connections to LOCALHOST:8182 forwarded to remote address socks:0
debug1: Local forwarding listening on ::1 port 8182.
debug1: channel 0: new [port listener]
debug1: Local forwarding listening on 127.0.0.1 port 8182.
debug1: channel 1: new [port listener]
debug1: Requesting no-more-sessions@openssh.com
debug1: Entering interactive session.
debug1: pledge: exec
debug1: client_input_global_request: rtype hostkeys-00@openssh.com want_reply 0
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;&lt;code&gt;`&lt;/code&gt;&lt;br&gt;
The gateway connection seems to work:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;$ curl -x socks5h://localhost:8182
http://entry.datomic-solo.us-east-2.datomic.net:8182/
{:s3-auth-path &quot;datomic-solo-storagef7f305e7-wutene4nee-s3datomic-ci7fce3hk2gj&quot;}
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;But when trying to connect in Clojure (&lt;code&gt;(d/client cfg)&lt;/code&gt;), it times out:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;Execution error (ExceptionInfo) at datomic.client.impl.cloud/get-s3-auth-path (cloud.clj:179).
Unable to connect to localhost:8182

ginkgo.metadata.core=&amp;gt; *e
#error {
 :cause &quot;Unable to connect to localhost:8182&quot;
 :data {:cognitect.anomalies/category :cognitect.anomalies/unavailable, :cognitect.anomalies/message &quot;Total timeout 60000 ms elapsed&quot;, :config {:server-type :cloud, :region &quot;us-east-2&quot;, :system &quot;datomic-solo&quot;, :endpoint &quot;http://entry.datomic-solo.us-east-2.datomic.net:8182&quot;, :proxy-port 8182, :endpoint-map {:headers {&quot;host&quot; &quot;entry.datomic-solo.us-east-2.datomic.net:8182&quot;}, :scheme &quot;http&quot;, :server-name &quot;entry.datomic-solo.us-east-2.datomic.net&quot;, :server-port 8182}}}
 :via
 [{:type java.lang.RuntimeException
   :message &quot;could not start [#'ginkgo.metadata.ferment/conn] due to&quot;
   :at [mount.core$up$fn__247 invoke &quot;core.cljc&quot; 94]}
  {:type clojure.lang.ExceptionInfo
   :message &quot;Unable to connect to localhost:8182&quot;
   :data {:cognitect.anomalies/category :cognitect.anomalies/unavailable, :cognitect.anomalies/message &quot;Total timeout 60000 ms elapsed&quot;, :config {:server-type :cloud, :region &quot;us-east-2&quot;, :system &quot;datomic-solo&quot;, :endpoint &quot;http://entry.datomic-solo.us-east-2.datomic.net:8182&quot;, :proxy-port 8182, :endpoint-map {:headers {&quot;host&quot; &quot;entry.datomic-solo.us-east-2.datomic.net:8182&quot;}, :scheme &quot;http&quot;, :server-name &quot;entry.datomic-solo.us-east-2.datomic.net&quot;, :server-port 8182}}}
   :at [datomic.client.impl.cloud$get_s3_auth_path invokeStatic &quot;cloud.clj&quot; 179]}]
 :trace
 [[datomic.client.impl.cloud$get_s3_auth_path invokeStatic &quot;cloud.clj&quot; 179]
  [datomic.client.impl.cloud$get_s3_auth_path invoke &quot;cloud.clj&quot; 170]
  [datomic.client.impl.cloud$create_client invokeStatic &quot;cloud.clj&quot; 211]
  [datomic.client.impl.cloud$create_client invoke &quot;cloud.clj&quot; 194]
```
On the access client side it seems to connect and forward okay:
```
debug1: Connection to port 8182 forwarding to socks port 0 requested.
debug1: channel 2: new [dynamic-tcpip]
debug1: channel 2: free: direct-tcpip: listening port 8182 for
entry.datomic-solo.us-east-2.datomic.net port 8182, connect from 127.0.0.1 port
59870 to 127.0.0.1 port 8182, nchannels 3
&lt;/code&gt;&lt;/pre&gt;
&lt;p&gt;This is where I'm a bit stuck and not sure where to debug next. Does anyone have&lt;br&gt;
suggestions for what to poke or try next? Thanks much.&lt;/p&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/521/datomic-cloud-client-auth-path-unable-connect-localhost-8182</guid>
<pubDate>Thu, 19 Nov 2020 18:55:38 +0000</pubDate>
</item>
<item>
<title>What to do about &quot;syncContext completed and\/or Request lifecycle recycled&quot;?</title>
<link>https://ask.datomic.com/index.php/514/what-about-synccontext-completed-request-lifecycle-recycled</link>
<description>&lt;p&gt;We get into a state where we see a lot of &lt;code&gt;syncContext completed and\/or Request lifecycle recycled&lt;/code&gt; &lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;What does it mean?&lt;/li&gt;
&lt;li&gt;What can be done about it?&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The stack trace is:&lt;/p&gt;
&lt;pre&gt;&lt;code&gt;&quot;Trace&quot;: [
            [
                &quot;org.eclipse.jetty.server.AsyncContextState&quot;,
                &quot;state&quot;,
                &quot;AsyncContextState.java&quot;,
                52
            ],
            [
                &quot;org.eclipse.jetty.server.AsyncContextState&quot;,
                &quot;getResponse&quot;,
                &quot;AsyncContextState.java&quot;,
                118
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf_STAR_&quot;,
                &quot;invokeStatic&quot;,
                &quot;jetty.clj&quot;,
                326
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf_STAR_&quot;,
                &quot;invoke&quot;,
                &quot;jetty.clj&quot;,
                323
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf&quot;,
                &quot;invokeStatic&quot;,
                &quot;jetty.clj&quot;,
                351
            ],
            [
                &quot;cognitect.http_endpoint.jetty$respond_bbuf&quot;,
                &quot;invoke&quot;,
                &quot;jetty.clj&quot;,
                348
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint&quot;,
                &quot;fail_request&quot;,
                &quot;http_endpoint.clj&quot;,
                126
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint&quot;,
                &quot;respond&quot;,
                &quot;http_endpoint.clj&quot;,
                147
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint$fn__13082$state_machine__8637__auto____13127$fn__13129&quot;,
                &quot;invoke&quot;,
                &quot;http_endpoint.clj&quot;,
                199
            ],
            [
                &quot;cognitect.http_endpoint.Endpoint$fn__13082$state_machine__8637__auto____13127&quot;,
                &quot;invoke&quot;,
                &quot;http_endpoint.clj&quot;,
                199
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine&quot;,
                &quot;invokeStatic&quot;,
                &quot;ioc_macros.clj&quot;,
                978
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine&quot;,
                &quot;invoke&quot;,
                &quot;ioc_macros.clj&quot;,
                977
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine_wrapped&quot;,
                &quot;invokeStatic&quot;,
                &quot;ioc_macros.clj&quot;,
                982
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$run_state_machine_wrapped&quot;,
                &quot;invoke&quot;,
                &quot;ioc_macros.clj&quot;,
                980
            ],
            [
                &quot;clojure.core.async.impl.ioc_macros$take_BANG_$fn__5769&quot;,
                &quot;invoke&quot;,
                &quot;ioc_macros.clj&quot;,
                991
            ],
            [
                &quot;clojure.core.async.impl.channels.ManyToManyChannel$fn__589$fn__590&quot;,
                &quot;invoke&quot;,
                &quot;channels.clj&quot;,
                95
            ],
            [
                &quot;clojure.lang.AFn&quot;,
                &quot;run&quot;,
                &quot;AFn.java&quot;,
                22
            ],
            [
                &quot;java.util.concurrent.ThreadPoolExecutor&quot;,
                &quot;runWorker&quot;,
                &quot;ThreadPoolExecutor.java&quot;,
                1149
            ],
            [
                &quot;java.util.concurrent.ThreadPoolExecutor$Worker&quot;,
                &quot;run&quot;,
                &quot;ThreadPoolExecutor.java&quot;,
                624
            ],
            [
                &quot;clojure.core.async.impl.concurrent$counted_thread_factory$reify__492$fn__493&quot;,
                &quot;invoke&quot;,
                &quot;concurrent.clj&quot;,
                29
            ],
            [
                &quot;clojure.lang.AFn&quot;,
                &quot;run&quot;,
                &quot;AFn.java&quot;,
                22
            ],
            [
                &quot;java.lang.Thread&quot;,
                &quot;run&quot;,
                &quot;Thread.java&quot;,
                748
            ]
        ]
&lt;/code&gt;&lt;/pre&gt;
</description>
<category>Cloud</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/514/what-about-synccontext-completed-request-lifecycle-recycled</guid>
<pubDate>Mon, 16 Nov 2020 22:03:14 +0000</pubDate>
</item>
<item>
<title>What approach do you use to detect a good connection to avoid :cognitect.anomalies/unavailable exceptions?</title>
<link>https://ask.datomic.com/index.php/486/approach-connection-cognitect-anomalies-unavailable-exceptions</link>
<description>&lt;p&gt;I'm working on a retry+backoff solution for the &lt;code&gt;:cognitect.anomalies/unavailable&lt;/code&gt; &quot;Loading Database&quot; exception that we get after our ions restart. If this is a common issue like the &lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/cloud/troubleshooting.html#loading-db&quot;&gt;troubleshooting docs suggest&lt;/a&gt;, I'm wondering how others are handling this.&lt;/p&gt;
&lt;p&gt;My current approach when getting the connection with &lt;code&gt;d/connect&lt;/code&gt; is to try/catch when performing a simple check if the connection is active (something like &lt;code&gt;(d/db-stats (d/db conn))&lt;/code&gt;). I've also considered doing a &lt;code&gt;d/q&lt;/code&gt; query for some specific datom that I know is present.&lt;/p&gt;
&lt;p&gt;I've also wondered if the ion has some other mechanism of denying incoming http or lambda requests after restart until the Datomic connection is viable.&lt;/p&gt;
&lt;p&gt;Any thoughts or other ideas? Thanks for your input!&lt;/p&gt;
</description>
<category>Client API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/486/approach-connection-cognitect-anomalies-unavailable-exceptions</guid>
<pubDate>Tue, 27 Oct 2020 20:44:31 +0000</pubDate>
</item>
<item>
<title>Expose an alt-port transactor configuration property</title>
<link>https://ask.datomic.com/index.php/469/expose-an-alt-port-transactor-configuration-property</link>
<description>&lt;p&gt;The alt-host configuration property is great and helps in many scenarios, but not having an equivalent for the port (alt-port?) is a blocker in some other scenarios. It would be great to have such property, which would default to the same port as the transactor is listening.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/469/expose-an-alt-port-transactor-configuration-property</guid>
<pubDate>Sun, 25 Oct 2020 19:45:14 +0000</pubDate>
</item>
<item>
<title>`gcDeletedDBs` available in peer API</title>
<link>https://ask.datomic.com/index.php/471/gcdeleteddbs-available-in-peer-api</link>
<description>&lt;p&gt;It would be very helpful to be able to call &lt;code&gt;gcDeletedDBs&lt;/code&gt; programmatically from the API.  Providing the felxibility of passing in a Datasource. Allows users to get GC capabilities in the app.&lt;/p&gt;
</description>
<category>Peer API</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/471/gcdeleteddbs-available-in-peer-api</guid>
<pubDate>Sun, 25 Oct 2020 19:36:18 +0000</pubDate>
</item>
<item>
<title>Store values encrypted, allowing key rotation.</title>
<link>https://ask.datomic.com/index.php/464/store-values-encrypted-allowing-key-rotation</link>
<description>&lt;p&gt;In our application we have a requirement to store certain fields encrypted. This encryption is done in the application. However, we would like to be able to rotate the encryption key should it become compromised, and retain the historical query features that you would get with unencrypted storage. In order to rotate the key, we have to excise the data and re-transact it with the new key, or store the encrypted values outside of Datomic. It would be nice to have an encryption API that enabled this use case.&lt;/p&gt;
</description>
<category>Datomic</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/464/store-values-encrypted-allowing-key-rotation</guid>
<pubDate>Sun, 25 Oct 2020 19:14:02 +0000</pubDate>
</item>
<item>
<title>Create DB from sequence of transactions</title>
<link>https://ask.datomic.com/index.php/462/create-db-from-sequence-of-transactions</link>
<description>&lt;p&gt;Given an input sequence of transactions expressed as EDN or some other format, provide a process to create a new Datomic database &quot;offline&quot; as quickly as possible, either in a supported storage backend or as a backup suitable for restore-db.&lt;/p&gt;
&lt;p&gt;The input transactions will use real Entity IDs, not tempids. Provide public APIs for constructing Entity IDs correctly.&lt;/p&gt;
&lt;p&gt;No other transactions or queries can be performed while the new database is being built. The input transactions cannot call any transaction functions.&lt;/p&gt;
&lt;p&gt;Similarly, provide an &quot;export&quot; process to write out the transaction log of an existing database to a file in the same format.&lt;/p&gt;
&lt;p&gt;This is essentially an optimization of the current process for bulk imports with a Transactor, with the added benefit of being able to control the creation of Entity IDs. This might be used, for example, to make a copy of a Datomic database with a filter or transformation applied to the transactions.&lt;/p&gt;
</description>
<category>Datomic</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/462/create-db-from-sequence-of-transactions</guid>
<pubDate>Sun, 25 Oct 2020 18:35:40 +0000</pubDate>
</item>
<item>
<title>Allow for setting transactor properties using environment variables</title>
<link>https://ask.datomic.com/index.php/470/allow-setting-transactor-properties-environment-variables</link>
<description>&lt;p&gt;Datomic should be able to read it's settings from environment variables, following a naming standard like what Spring Boot does. E.g.:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;&lt;code&gt;DATOMIC_LICENSE_KEY&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DATOMIC_PROTOCOL&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;&lt;code&gt;DATOMIC_PORT&lt;/code&gt;&lt;/li&gt;
&lt;li&gt;…&lt;/li&gt;
&lt;/ul&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/470/allow-setting-transactor-properties-environment-variables</guid>
<pubDate>Sun, 25 Oct 2020 18:08:09 +0000</pubDate>
</item>
<item>
<title>Support AWS dynamo point in time backup in on-prem.</title>
<link>https://ask.datomic.com/index.php/468/support-aws-dynamo-point-in-time-backup-in-on-prem</link>
<description>&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-continuous-backups-and-point-in-time-recovery-pitr/&quot;&gt;https://aws.amazon.com/blogs/aws/new-amazon-dynamodb-continuous-backups-and-point-in-time-recovery-pitr/&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Currently Datomic supplies backup/restore capability here:&lt;/p&gt;
&lt;p&gt;&lt;a rel=&quot;nofollow&quot; href=&quot;https://docs.datomic.com/on-prem/backup.html&quot;&gt;https://docs.datomic.com/on-prem/backup.html&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;Dynamo's PITR remains untested for use with Datomic DBs. Implementation of this feature would ensure that using Dynamo's PITR causes no issues on a Datomic DB.&lt;/p&gt;
</description>
<category>On-Prem</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/468/support-aws-dynamo-point-in-time-backup-in-on-prem</guid>
<pubDate>Sun, 25 Oct 2020 16:57:02 +0000</pubDate>
</item>
<item>
<title>Pass along DDB request IDs with transactions</title>
<link>https://ask.datomic.com/index.php/463/pass-along-ddb-request-ids-with-transactions</link>
<description>&lt;p&gt;Include the Dynamo DB request IDs with transactions.&lt;/p&gt;
&lt;p&gt;In order to provide more information for troubleshooting, the DDB team has indicated that passing along the DDB request ID with transactions would enable further troubleshooting, down to the specific problematic transactions.&lt;/p&gt;
</description>
<category>Datomic</category>
<guid isPermaLink="true">https://ask.datomic.com/index.php/463/pass-along-ddb-request-ids-with-transactions</guid>
<pubDate>Sun, 25 Oct 2020 16:41:05 +0000</pubDate>
</item>
</channel>
</rss>