7

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.

Kevin
  • 24,871
  • 19
  • 102
  • 158

1 Answers1

8

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.

Timothy Baldridge
  • 10,455
  • 1
  • 44
  • 80
  • Yeah. It was something like this. I was doing something stupid which caused the wrong data to be sent into transact. – Kevin Jun 08 '16 at 16:15