Welcome! Please see the About page for a little more info on how this works.

0 votes
in Peer API by

Datomic seems to be shading spymemcached. The logger implementation of spymemcached uses the property net.spy.log.LoggerImpl.

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.

1 Answer

0 votes
by

Thanks for the report Mike, how are you setting the property?

Just something like this in the logback.xml for a transactor? a peer? ether?

<logger name="net.spy" level="WARN"/>

I am looking to reproduce to track down what we missed.

by
Here's a repro:

$ clojure -Sdeps '{:deps {com.datomic/peer {:mvn/version "1.0.7277"} clojurewerkz/spyglass {:mvn/version "1.2.0"}}}' -J-Ddatomic.memcachedServers=localhost:11211
Clojure 1.12.0
user=> (require 'datomic.api)
nil
user=> ((requiring-resolve 'clojurewerkz.spyglass.client/bin-connection) "localhost:11211")
Execution error (ClassCastException) at net.spy.memcached.compat.log.LoggerFactory/getNewInstance (LoggerFactory.java:118).
class datomic.spy.memcached.compat.log.Log4JLogger cannot be cast to class net.spy.memcached.compat.log.Logger (datomic.spy.memcached.compat.log.Log4JLogger and net.spy.memcached.compat.log.Logger are in unnamed module of loader 'app')
Welcome to the Datomic Knowledgebase, where you can make features requests, ask questions and receive answers from other members of the community.
...