Fork me on GitHub

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


I'm using this URL pattern for oracle jdbc:oracle:thin:user/pass@//host:1521/schema


doesn't work 😞


the only other thing to check would be the driver


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")


and it's using the url pattern above


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


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


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))