luminus

heyarne 2020-01-03T14:47:52.003100Z

Happy new year! I'm running into a weird problem at the moment

heyarne 2020-01-03T14:49:09.004400Z

I want to redefine some SQL select statement, I have all SQL statements defined in a single queries.sql, basically just how the leiningen template sets it up

heyarne 2020-01-03T14:50:04.005Z

When I run restart-db I get the following stacktrace (from within CIDER):

Syntax error (ClassCastException) compiling at (REPL:1:1).
clojure.lang.Symbol cannot be cast to clojure.lang.Namespace
ERROR: Unhandled REPL handler exception processing message {:nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/options {:right-margin 80}, :op stacktrace, :session 2aab6308-4ed8-40e2-a75d-253c9202a34f, :id 253}
java.lang.NullPointerException
	at clojure.string$replace_first.invokeStatic(string.clj:165)
	at clojure.string$replace_first.invoke(string.clj:138)
	at cider.nrepl.middleware.stacktrace$relative_path.invokeStatic(stacktrace.clj:197)
	at cider.nrepl.middleware.stacktrace$relative_path.invoke(stacktrace.clj:191)
	at cider.nrepl.middleware.stacktrace$extract_location.invokeStatic(stacktrace.clj:211)
	at cider.nrepl.middleware.stacktrace$extract_location.invoke(stacktrace.clj:199)
	at clojure.core$map$fn__5862$fn__5863.invoke(core.clj:2742)
	at clojure.core$map$fn__5862$fn__5863.invoke(core.clj:2742)
	at clojure.core$take_while$fn__5913$fn__5914.invoke(core.clj:2901)
	at clojure.lang.Iterate.reduce(Iterate.java:81)
	at clojure.core$transduce.invokeStatic(core.clj:6883)
	at clojure.core$into.invokeStatic(core.clj:6899)
	at clojure.core$into.invoke(core.clj:6887)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invokeStatic(stacktrace.clj:314)
	at cider.nrepl.middleware.stacktrace$analyze_causes.invoke(stacktrace.clj:306)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invokeStatic(stacktrace.clj:323)
	at cider.nrepl.middleware.stacktrace$handle_stacktrace.invoke(stacktrace.clj:320)
	at clojure.lang.Var.invoke(Var.java:388)
	at cider.nrepl$wrap_stacktrace$fn__25867.invoke(nrepl.clj:397)
	at nrepl.middleware$wrap_conj_descriptor$fn__23168.invoke(middleware.clj:16)
	at nrepl.middleware.session$session$fn__23613.invoke(session.clj:272)
	at nrepl.middleware$wrap_conj_descriptor$fn__23168.invoke(middleware.clj:16)
	at nrepl.middleware.print$wrap_print$fn__23392.invoke(print.clj:234)
	at nrepl.middleware$wrap_conj_descriptor$fn__23168.invoke(middleware.clj:16)
	at nrepl.server$handle_STAR_.invokeStatic(server.clj:18)
	at nrepl.server$handle_STAR_.invoke(server.clj:15)
	at nrepl.server$handle$fn__23650.invoke(server.clj:27)
	at clojure.core$binding_conveyor_fn$fn__5754.invoke(core.clj:2030)
	at clojure.lang.AFn.call(AFn.java:18)
	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
	at java.lang.Thread.run(Thread.java:748)

heyarne 2020-01-03T14:51:38.006300Z

And (restart) does not seem to reload the sql file correctly? Neither does (do (stop) (start))… I'm a bit at a loss where to look?

heyarne 2020-01-03T14:53:27.006600Z

The problem seems to be with the binding in restart-db?

heyarne 2020-01-03T14:57:40.007200Z

When I run the conman/… statement directly from within the ….db.core namespace that works