Classpath transaction functions

I’m trying to use a classpath function as a transaction function, but I’m not having any luck so far. I’m using Datomic Starter Edition in a Docker container is this case.

What I’ve done is:

  • Put Datomic in /opt/datomic-pro-1.0.6269.
  • Package up my functions as a single clj file (libdomains.clj), which is in a jar file (libdomains.jar). I put the jar file in /opt/datomic-pro-1.0.6269/lib. The clojure file contains (ns libdomains ...) and defines a function put-object.
  • I set ENV DATOMIC_EXT_CLASSPATH=/opt/datomic-pro-1.0.6269/lib/libdomains.jar in my Dockerfile.
  • Build and run my container.
  • Start a dev transactor, create a database, and start the peer server.
  • Attempt to transact [[libdomains/put-object args...]] via a peer server connection (I’m not using Clojure on the client side, so this requires using the peer server).

I keep getting an error Unable to resolve data function: libdomains.put-object. If I start up the datomic repl, I can (require 'libdomains) and use the function that way, so it seems to be on the classpath. Any ideas on what I can debug next? The documentation seems to indicate that this was all I needed to do.

Any chance it should be libdomains/put-object ?

Also, have you installed your transaction function as per Database Functions | Datomic ?

Just trying to eliminate the low hanging fruit :smiley:

:hear_no_evil: That was, in fact, it. I had a . not a /.