mount

tianshu 2017-01-16T04:48:55.000473Z

I think my code is almost the same:

(ns caiba-data.nrepl
  (:require [mount.core :as mount :refer [defstate]]
            [clojure.tools.nrepl.server :refer [start-server stop-server]]))

(defn start-nrepl []
  (start-server :bind "0.0.0.0" :port 7888))

(defstate nrepl
  :start (start-nrepl)
  :stop (stop-server nrepl))
and I use mount/start in my core ns. other state works fine, except nrepl.

tianshu 2017-01-16T04:50:32.000474Z

BTW, If I just use start-nrepl, it works fine.

tolitius 2017-01-16T14:14:50.000479Z

the exception is coming from db.clj line 13

tolitius 2017-01-16T14:15:43.000480Z

what is that line, and do you have requires in that namespace?

tolitius 2017-01-16T14:18:59.000481Z

if you can create an example (with all ns involved) that I can look at, it'll be easier for me to help