nosuchmethoderrordatomic

Datomic v1.0.6202 throws NoSuchMethodError on datomic.api/create-database for :dev storage (io.netty.channel.SingleThreadEventLoop)


Attempting to create a database in a local Datomic :dev transactor (v1.0.6202) throws NoSuchMethodError, but in-memory DB works:

(d/create-database "datomic:mem://localhost:4334/test")
=> true
(d/connect "datomic:mem://localhost:4334/test")
=> #object[datomic.peer.LocalConnection 0x3a5266c4 "datomic.peer.LocalConnection@3a5266c4"]

Now let's try against the local :dev transactor running Java 1.8:

(d/connect "datomic:dev://localhost:4334/blog")
=> Execution error at datomic.peer/get-connection$fn (peer.clj:661).
Could not find blog in catalog

;; Let's try to create it:
(d/create-database "datomic:dev://localhost:4334/blog")
Execution error (NoSuchMethodError) at io.netty.channel.SingleThreadEventLoop/<init> (SingleThreadEventLoop.java:65).
'void io.netty.util.concurrent.SingleThreadEventExecutor.<init>(io.netty.util.concurrent.EventExecutorGroup, java.util.concurrent.Executor, boolean, java.util.Queue, io.netty.util.concurrent.RejectedExecutionHandler)'

At first I assumed this was related to my recent question about Datomic transactor requiring Java 1.8 or earlier (v15 fails silently), but this error occurs for all JDKs I tried.

I am using Clojure 1.10.1 and Datomic v1.0.6202 on transactor and dependency in my app.


Solution

  • Looks like a Netty conflict from aleph or manifold. I downgraded Aleph and the issue was resolved.

    I wish there was a better way to debug these types of conflicts.