This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2016-03-11
Channels
- # admin-announcements (20)
- # beginners (48)
- # boot (90)
- # cider (33)
- # cljs-dev (5)
- # cljsjs (10)
- # cljsrn (7)
- # clojure (68)
- # clojure-austin (5)
- # clojure-bangladesh (4)
- # clojure-finland (10)
- # clojure-gamedev (1)
- # clojure-madison (7)
- # clojure-poland (15)
- # clojure-russia (75)
- # clojurescript (25)
- # core-async (23)
- # cursive (5)
- # data-science (43)
- # datomic (15)
- # dirac (26)
- # editors (10)
- # emacs (2)
- # euroclojure (12)
- # funcool (23)
- # hoplon (7)
- # immutant (68)
- # jobs (24)
- # jobs-discuss (1)
- # juxt (1)
- # keechma (9)
- # ldnclj (7)
- # luminus (66)
- # off-topic (54)
- # om (170)
- # proton (7)
- # re-frame (1)
- # reagent (15)
- # ring-swagger (11)
- # spacemacs (6)
- # testing (1)
- # vim (1)
- # yada (19)
So… what’s the convention when dealing with keys that have dashes on the name, but working with a db that does not support them (say, Postgres)?
Say, foreign-id. Using foreignid as the column name, or having a mixture of dashes and underscores on the names, seem equally ugly.
I'm having a db issue with a recent version of Luminus (I think), where trying to operate on a database is giving me this: 'IllegalArgumentException db-spec mount.core.DerefableState@6dc3d84b is missing a required parameter clojure.java.jdbc/get-connection (jdbc.clj:292)'
@nnbosko: Have a look at this: https://forums.pragprog.com/forums/387/topics/14104
I'm afraid the REPL connection didn't do it
And it doesn't seem to be an issue with the syntax for calling up the query or the query itself
Probably a question best answered by @yogthos . I've seen a few folks run into this with luminus & mount, but I'm not sure all of the steps for troubleshooting.
if you do lein run
then start-app
function gets called and starts up all the components
if you’re starting the repl then you probably want to either run that or run (start)
in the user namespace, the repl should default to it
my recommended approach is to use lein run
to start the app, and then connect to the nrepl that it starts on port 7000
Yes, it's what I just tried
you can start it explicitly as seen here https://github.com/tolitius/mount#start-and-stop-parts-of-application
It's required by an auth service, I'm on its namespace calling up a db query through it
Basically I'm going through the gallery tutorial on the Web dev book
[2016-03-11 17:21:16,140][INFO][com.zaxxer.hikari.HikariDataSource] HikariPool-0 - is starting.
[2016-03-11 17:21:16,563][INFO][wstore.core] #'wstore.db.core/db started
It does, yes
It happens when I'm calling up the register! function
Yes, which is connected to the app's nREPL server
Calling it from the client raises the same error
Yeah, I haven't really deviated from the tutorial either
can you try running (require '[mount.tools.graph :as graph]) (graph/states-with-deps)
Here's the full trace
Yes, the URL is correct
I'm going to check a previous project I had to see if I can hook up to the db from there
No issues there
Ran a clean and rebuilt just in case, still nothing
Do you have a gitlab account?
for example I got [2016-03-11 15:37:05,596][DEBUG][org.jboss.logging] Logging Provider: org.jboss.logging.Log4jLoggerProvider [2016-03-11 15:37:07,244][INFO][luminus.http-server] starting HTTP server on port 3000 [2016-03-11 15:37:07,308][INFO][org.xnio] XNIO version 3.4.0.Beta1 [2016-03-11 15:37:07,425][INFO][org.xnio.nio] XNIO NIO Implementation Version 3.4.0.Beta1 [2016-03-11 15:37:07,529][INFO][org.projectodd.wunderboss.web.Web] Registered web context / [2016-03-11 15:37:07,532][INFO][luminus.repl-server] starting nREPL server on port 7000 [2016-03-11 15:37:07,567][INFO][myapp.core] #'myapp.config/env started [2016-03-11 15:37:07,567][INFO][myapp.core] #'myapp.core/http-server started [2016-03-11 15:37:07,567][INFO][myapp.core] #'myapp.core/repl-server started [2016-03-11 15:37:07,568][INFO][myapp.env] -=[myapp started successfully using the development profile]=-
lein repl :connect 7000 Connecting to nREPL at 127.0.0.1:7000 REPL-y 0.3.7, nREPL 0.2.12 Clojure 1.8.0 Java HotSpot(TM) 64-Bit Server VM 1.8.0_45-b14 Docs: (doc function-name-here) (find-doc "part-of-name-here") Source: (source function-name-here) Javadoc: (javadoc java-object-or-class-here) Exit: Control+D or (exit) or (quit) Results: Stored in vars *1, *2, *3, an exception in *e user=> (use 'myapp.db.core) nil user=> (get-user {:id ""}) nil
Does your postgresql log file provide any clues?
Got it
I missed a column name by one letter, it was in the psql logs, thanks @curtis.summers
And thank you for your time, @yogthos
Yes, the stack traces could be a little better for jdbc
I usually tail -f my postgresql log in a terminal when I'm writing a bunch of queries because of past experiences hunting for this kind of error. Glad you figured it out.
Thanks to you guys. Better keep going with this then
@curtis.summers: and good call on checking the postgres log