3
votes

I'm getting this when I'm calling transact:

datomic.impl.Exceptions$IllegalArgumentExceptionInfo: :db.error/not-a-data-function Not a data function: 71 data: {:db/error :db.error/not-a-data-function} java.util.concurrent.ExecutionException: java.lang.IllegalArgumentException: :db.error/not-a-data-function Not a data function: 71

What is the error message trying to tell me? I don't have '71' in my data anywhere, so ah, um... Yeah. This takes clojure stack traces to a new level.

1
What was your datomic query? - Piotrek Bzdyl
Can you provide the contents of your call to transact? - Marshall

1 Answers

4
votes

Datomic supports database functions. So let's say you installed a database function called ":foo/bar" you would call it in a transaction thusly:

[[:foo/bar arg1 arg2 ...]]

What this error is saying is that it thinks you are calling a database function, but that function does't exist. In this case it thinks that function name is 71.

Take a look at the data you are transacting and make sure it is in the correct format. For example, I've seen this error when passing a map as {:my/key 42} instead of [{:my/key 42}]. The input of transact should always be a sequence of data, even if all you are transacting is a hashmap.