Hi all, I have a problem running cemerick/friend with lein ring. When I start the application with lein ring server-headless, I just get a warning (WARNING: identity already refers to: #'clojure.core/identity in namespace: civi.core, being replaced by: #'cemerick.friend/identity) but am able to proceed running the app without problems.
If I update the the code to trigger a ring reload, I get the following stacktrace and the running application is not updated: Exception: java.lang.IllegalStateException: identity already refers to: #'cemerick.friend/identity in namespace: civi.core Namespace.java:88 clojure.lang.Namespace.warnOrFailOnReplace Namespace.java:110 clojure.lang.Namespace.reference Namespace.java:168 clojure.lang.Namespace.refer core.clj:3850 clojure.core/refer RestFn.java:410 clojure.lang.RestFn.invoke core.clj:1 civi.core/eval1587[fn] core.clj:1 civi.core/eval1587 Compiler.java:6619 clojure.lang.Compiler.eval Compiler.java:6608 clojure.lang.Compiler.eval Compiler.java:7064 clojure.lang.Compiler.load RT.java:370 clojure.lang.RT.loadResourceScript RT.java:361 clojure.lang.RT.loadResourceScript RT.java:440 clojure.lang.RT.load RT.java:411 clojure.lang.RT.load core.clj:5530 clojure.core/load[fn] core.clj:5529 clojure.core/load RestFn.java:408 clojure.lang.RestFn.invoke core.clj:5336 clojure.core/load-one core.clj:5375 clojure.core/load-lib[fn] core.clj:5374 clojure.core/load-lib RestFn.java:142 clojure.lang.RestFn.applyTo core.clj:619 clojure.core/apply core.clj:5413 clojure.core/load-libs RestFn.java:137 clojure.lang.RestFn.applyTo core.clj:619 clojure.core/apply core.clj:5496 clojure.core/require RestFn.java:421 clojure.lang.RestFn.invoke reload.clj:17 ring.middleware.reload/wrap-reload[fn] stacktrace.clj:15 ring.middleware.stacktrace/wrap-stacktrace-log[fn] stacktrace.clj:79 ring.middleware.stacktrace/wrap-stacktrace-web[fn] jetty.clj:18 ring.adapter.jetty/proxy-handler[fn] ..... In the application, I have :use [cemerick.friend :as friend], where indeed a identity function is defined. Here is the clojure code that gives me a warning the first time and error the second time: private void warnOrFailOnReplace(Symbol sym, Object o, Object v){ if (o instanceof Var) { Namespace ns = ((Var)o).ns; if (ns == this) return; if (ns != RT.CLOJURE_NS) throw new IllegalStateException(sym + " already refers to: " + o + " in namespace: " + name); } RT.errPrintWriter().println("WARNING: " + sym + " already refers to: " + o + " in namespace: " + name + ", being replaced by: " + v); } Any suggestions on how to solve this? Now I have to stop/start the server for ever change which is not very good workflow. Regards, Assen Kolov -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.