Thanks Everything is working as per expectation.

On Friday, December 6, 2013 6:38:23 PM UTC+5:30, Avinash Dongre wrote:
>
> Hi
> I have our own jdbc driver when I am trying to use clojure java.jdbc it is 
> giving me error like below
>
> Exception in thread "main" java.lang.ClassCastException: 
> a.b.my_custom_driver cannot be cast to clojure.lang.IFn
> at clojure.gemfireXD.jdbc$createStatement.invoke(client.clj:13)
> at clojure.gemfireXD.jdbc$eval13.invoke(client.clj:18)
> at clojure.lang.Compiler.eval(Compiler.java:6619)
> at clojure.lang.Compiler.load(Compiler.java:7064)
> at clojure.lang.Compiler.loadFile(Compiler.java:7020)
> at clojure.main$load_script.invoke(main.clj:294)
> at clojure.main$script_opt.invoke(main.clj:356)
> at clojure.main$main.doInvoke(main.clj:440)
> at clojure.lang.RestFn.invoke(RestFn.java:408)
> at clojure.lang.Var.invoke(Var.java:415)
> at clojure.lang.AFn.applyToHelper(AFn.java:161)
> at clojure.lang.Var.applyTo(Var.java:532)
> at clojure.main.main(main.java:37)
>
>
> When I tried following 
>
>
>
> (ns clojure.custom.jdbc
>   (:import [java.sql Connection DriverManager])
>   (:require [clojure.string :as clojure-string]))
>
> (defn getConnecton
>   [url]
>   (clojure.lang.RT/loadClassForName "custom.url.ClientDriver") 
>   (DriverManager/getConnection url))
>
> (defn createStatement
>   [db]
>   (^Statement (.createStatement db)
>   ))
>   
>
> (createStatement((getConnecton "jdbc:mydbServer://localhost:1527/")))
>
> Exception in thread "main" java.lang.ClassCastException: 
> my.custom.implementation.internal.ConnectionCustom cannot be cast to 
> clojure.lang.IFn
> at clojure.gemfireXD.jdbc$eval13.invoke(client.clj:16)
> at clojure.lang.Compiler.eval(Compiler.java:6619)
> at clojure.lang.Compiler.load(Compiler.java:7064)
> at clojure.lang.Compiler.loadFile(Compiler.java:7020)
> at clojure.main$load_script.invoke(main.clj:294)
> at clojure.main$script_opt.invoke(main.clj:356)
> at clojure.main$main.doInvoke(main.clj:440)
> at clojure.lang.RestFn.invoke(RestFn.java:408)
> at clojure.lang.Var.invoke(Var.java:415)
> at clojure.lang.AFn.applyToHelper(AFn.java:161)
> at clojure.lang.Var.applyTo(Var.java:532)
> at clojure.main.main(main.java:37)
>
>
> What I am missing here.
>

-- 
-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Reply via email to