New to clojure. Trying to connect to the oracle database and getting an error
SQLException ORA-28040: No matching authentication protocol
oracle.jdbc.driver.DatabaseError.throwSqlException (DatabaseError.java:112)
I am suspecting something wrong with the dependencies but I am too new to figure out
Here is my project.clj file
(defproject my_project "0.1.0-SNAPSHOT"
:dependencies [[org.clojure/clojure "1.6.0"]
[org.clojure/java.jdbc "0.6.1"]
[com.oracle.jdbc/com.springsource.oracle.jdbc "10.2.0.2"]
[com.oracle.xdb/com.springsource.oracle.xdb "10.2.0.2"]])
And here is the code. I am trying to execute the f2 function in REPL and that is when I get the error
;; defines the parameters for connecting to the database
(def db-info {:hostname "dont.want.to.tell.com"
:port 1521
:database "db"
:user "someuser"
:password "somepassword"})
;; creates connection string from the db-info map
(defn get-connection-string [db-info]
(str "thin:@" (:hostname db-info) ":" (:port db-info) ":" (:database db-info)))
;;defines the db map that would be used for queries
(def db {:classname "oracle.jdbc.OracleDriver"
:subprotocol "oracle"
:subname (get-connection-string db-info)
:user (:user db-info)
:password (:password db-info)})
(defn f2 []
(jdbc/query db ["select * from secret_table where rownum < 2"] {:row-fn :cost}))