LauJensen / clojureql

ClojureQL is superior SQL integration for Clojure
https://clojureql.sabrecms.com
Eclipse Public License 1.0
285 stars 39 forks source link

IllegalArgumentException in `lein repl` with Clojure 1.3.0 #115

Closed klauern closed 6 years ago

klauern commented 12 years ago

Is ClojureQL supported with Leiningen and Clojure 1.3.0? I get this weird set of errors while trying to use it (still a bit of a n00b on this, fwiw):

project.clj

(defproject clojureql-oracle "1.0.0-SNAPSHOT"
            :description "ClojureQL on Oracle Databases"
            :dependencies [[org.clojure/clojure "1.3.0"]
                           [clojureql "1.1.0-SNAPSHOT"] ; 1.0.2 doesn't seem to be on CloJars, so up up and away we go
                           [com.oracle/ojdbc6 "11.2.0.2.0"]
                           ;[org.clojure/java.jdbc "0.0.7"]
                           ])

libs downloaded from lein deps

clojure-1.3.0.jar
clojure-contrib-1.2.0.jar
clojureql-1.1.0-20110104.084027-8.jar
ojdbc6-11.2.0.2.0.jar

REPL output

PS C:\mydocs\Clojure\clojureql-oracle> lein repl
REPL started; server listening on localhost port 34695
user=> (use 'clojureql.core)
Warning: *default-encoding* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *default-encoding* or change the name.
Warning: *buffer-size* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *buffer-size* or change the name.
Warning: *byte-array-type* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *byte-array-type* or change the name.
Warning: *char-array-type* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *char-array-type* or change the name.
Warning: *append* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *append* or change the name.
Warning: *db* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *db* or change the name.
IllegalArgumentException No matching field found: getRoot for class clojure.lang.Var  clojure.lang.Reflector.getInstanceField (Reflector.java:289)user=>

This seems like a lot of weird errors, and being a very new Clojure developer, I don't even know what the first 6 warnings are, but that last one made me think things weren't kosher:

IllegalArgumentException No matching field found: getRoot for class clojure.lang.Var  clojure.lang.Reflector.getInstanceField (Reflector.java:289)
klauern commented 12 years ago

Just to clarify, if I remove the Oracle JDBC driver jar, this error still occurs, so it doesn't appear to be related.

gberenfield commented 12 years ago

I believe this is a clojure-contrib-1.2.0 incompatibility with clojure 1.3. Seeing this too anytime clojure-contrib loaded with 1.3.

veddan commented 11 years ago

This appears to happen on 1.4.0 as well.

project.clj

(defproject foo "1.0"
  :dependencies [[org.clojure/clojure "1.4.0"]
                   [postgresql "9.1-901.jdbc4"]
                   [clojureql "1.0.0"]])

REPL output

user=> (use 'clojureql.core)
Warning: *default-encoding* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *default-encoding* or change the name. (clojure/contrib/io.clj:73)
Warning: *buffer-size* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *buffer-size* or change the name. (clojure/contrib/io.clj:79)
Warning: *byte-array-type* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *byte-array-type* or change the name. (clojure/contrib/io.clj:84)
Warning: *char-array-type* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *char-array-type* or change the name. (clojure/contrib/io.clj:88)
Warning: *append* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *append* or change the name. (clojure/contrib/io.clj:107)
Warning: *db* not declared dynamic and thus is not dynamically rebindable, but its name suggests otherwise. Please either indicate ^:dynamic *db* or change the name. (clojure/contrib/sql/internal.clj:27)
IllegalArgumentException No matching field found: getRoot for class clojure.lang.Var  clojure.lang.Reflector.getInstanceField (Reflector.java:271)

The clojure-contrib-1.2.0 jar is downloaded for me as well.

LauJensen commented 6 years ago

This is more straight forward in master, which imports all deps (its up to you to exclude). But use cider-jack-in :)