I get this error as soon as I do "lein run". On startup neocons isn't even used yet. I create connections later on a per request base.
That's part of what confuses me so much.
(ns holytools.server.interfaces.neo4j
(:require
[holytools.server.interfaces.log :as log]
[clojurewerkz.neocons.rest :as nr]
[clojurewerkz.neocons.rest.nodes :as nn]
[clojurewerkz.neocons.rest.relationships :as nrl]
[clojurewerkz.neocons.rest.cypher :as cy]
[clojurewerkz.neocons.rest.labels :as nl]))
(def server (atom "
http://127.0.0.1:7474/db/data/"))
(defn init
[url]
(reset! server url))
(defn- connect
"Create connection to specified database."
[]
(nr/connect @server))
(defn node
"Get a node by label and name"
([con label nname]
(get (first (cy/tquery con (str "MATCH (n:" label ") where
n.name={name} RETURN n") {:name nname})) "n"))
([label nname]
(node (connect) label nname)))
(defn user
"Get a user by name."
([con username]
(:data (node con "user" username)))
([username]
(:data (node "user" username))))
But the error is thrown as soon as this namespace is compiled.