Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

clojure.lang.PersistentVector cannot be cast to clojure.lang.Named #68

Closed
joelkuiper opened this issue Apr 26, 2016 · 6 comments
Closed

Comments

@joelkuiper
Copy link

joelkuiper commented Apr 26, 2016

[conman "0.4.9"]
[org.postgresql/postgresql "9.4.1208.jre7"]
[migratus "0.8.14"]

(def config  {:store :database
              :migration-dir "migrations"
              :db <jdbc uri here>})

Throws

             clojure.lang.ExceptionInfo: java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
    data: {:file
           "/var/folders/15/ksxs2q354zqgytqvbydtw0q80000gn/T/boot.user5129302622791575400.clj",
           :line 45}
java.util.concurrent.ExecutionException: java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
           java.lang.ClassCastException: clojure.lang.PersistentVector cannot be cast to clojure.lang.Named
                                clojure.core/name      core.clj: 1524
                    clojure.java.jdbc/as-sql-name      jdbc.clj:   67
clojure.java.jdbc/create-table-ddl/spec-to-string      jdbc.clj: 1133
                              clojure.core/map/fn      core.clj: 2624
                                              ...                    
                               clojure.core/first      core.clj:   55
                              clojure.string/join    string.clj:  185
               clojure.java.jdbc/create-table-ddl      jdbc.clj: 1137
                                              ...                    
                migratus.database/init-schema!/fn  database.clj:  225
                clojure.java.jdbc/db-transaction*      jdbc.clj:  602
                clojure.java.jdbc/db-transaction*      jdbc.clj:  587
                   migratus.database/init-schema!  database.clj:  220
               migratus.database.Database/connect  database.clj:  260
                                migratus.core/run      core.clj:   24
                            migratus.core/migrate      core.clj:   63
                              dre.task.migrate/up   migrate.clj:   20
                    dre.task.migrate/eval13103/fn   migrate.clj:   46
                                              ...                    
                               clojure.core/apply      core.clj:  630
                        boot.core/construct-tasks      core.clj:  760
                                              ...                    
                               clojure.core/apply      core.clj:  630
                                boot.core/boot/fn      core.clj:  805
              clojure.core/binding-conveyor-fn/fn      core.clj: 1916
                                              ...       

When I try to run migrate up.

@yogthos
Copy link
Owner

yogthos commented Apr 26, 2016

I switched version 0.8.14 to use the latest clojure.java.jdbc API, and it's incompatible with the current HugSQL. So, for now I recommend using 0.8.13, and once the new HugSQL gets released I'll update conman to use it.

@csummers
Copy link

I was going to wait for the official 0.6.0 release of clojure.java.jdbc before bumping HugSQL, but that seems to be taking a bit of time, so I'll push out a patch release with the fixes a bit later today.

@csummers
Copy link

HugSQL 0.4.7 is out with the fixes for the clojure.java.jdbc deprecations. The HugSQL clojure.java.jdbc adapter's dependency is specifically set to the latest stable 0.5.8, but these changes in HugSQL 0.4.7 should allow you to specify and use HugSQL without issue in the upcoming clojure.java.jdbc 0.6.x.

@yogthos
Copy link
Owner

yogthos commented Apr 27, 2016

Awesome thanks!

@ku1ik
Copy link

ku1ik commented Jun 9, 2016

I'm not using HugSQL but I'm getting this error on 0.8.22.

@yogthos
Copy link
Owner

yogthos commented Jun 9, 2016

That would indicate that the library you're using is expecting the old version of clojure.java.jdbc API. You'd either have to upgrade it or use an older version of migratus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants