Fork me on GitHub
#luminus
<
2017-04-05
>
h.elmougy11:04:34

I'm struggling connecting luminus to oracle db using the following URL jdbc:oracle:thin:username/password:@10.29.10.214:1521:orcl I'm getting -- Error creating DB connection for jdbc:oracle:thin....

yogthos12:04:19

I'm using this URL pattern for oracle jdbc:oracle:thin:user/[email protected]//host:1521/schema

h.elmougy13:04:37

doesn't work 😞

yogthos13:04:48

the only other thing to check would be the driver

yogthos13:04:02

here's what I have in a namespace for a working project that connects to oracle:

(defstate ^:dynamic *conn*
          :start (conman/connect! {:jdbc-url (env :db-url)})
          :stop (conman/disconnect! conn))

(conman/bind-connection *conn* "sql/queries.sql")

yogthos13:04:14

and it's using the url pattern above

yogthos13:04:21

oracle doesn't publish the drivers in public maven repos, so you have to install it locally

danboykis20:04:34

i haven't used it myself, so I can't say for sure if it works

lucian30320:04:51

i'm using a compojure-api route in my luminus app. is there a way to display a friendly (ideally JSON) error message when input validation fails and return a 4xx out of the box? is there some middleware I need to add for this functionality? right now, it just returns 500 when a parameter is missing and a blank body. From the compojure-api docs, not providing the text parameter should return a 4xx response w/ an explanation though I can't tell if that requires a custom exception handler or not nor how one would add one when not using the api function ... compojure-api docs are not clear enough for me to say much of anything for sure.

(GET "/check" []
          :return       String
          :query-params [text :- String]
          :summary      "Spell check some text and return suggestions."
          (send-response (json/generate-string (check text)) :json))