Since Clojure 1.3 “Earmuffed Vars are No Longer Automatically Considered Dynamic”, some code in clojure.contrib depends on this feature and they no longer work. For example db in clojure.contrib.sql.
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.
Exception in thread "main" java.lang.RuntimeException: java.lang.ExceptionInInitializerError
The contrib library is still in verion 1.2. How to work around this? Or is there some alpha or prerelease version of contrib lib that can work with Clojure 1.3?
When Clojure moved to 1.3 it was decided to abandon monolithic contrib, i.e. a single Contrib library with a bunch of independent projects. The reason for this – afaict – was that some libraries had been abandoned and it was difficult to get people to upgrade them for 1.3.
Furthermore, a few libraries also changed their name. An overview can be found here: http://dev.clojure.org/display/doc/Clojure+Contrib
In particular the contrib.sql library has been renamed to
java.jdbcand now lives here https://github.com/clojure/java.jdbc