Closed conan closed 9 years ago
It's likely that you have an old class files somewhere on your classpath that's causing issues.
The first thing to do is to run lein clean
. That will wipe your target directory, and in most cases solves issues like these.
If it doesn't, then you probably have a bad dependency, either from your project.clj file, or as a plugin via your profiles.clj file. This dependency will contain compiled class files, including ones from Compojure, that will override Compojure's source files.
You can find a bad dependency through trial and error. Remove plugins and dependencies until it works.
Hmm, OK thanks - I'll let you know how I go. I've done quite a lot of cleaning already, but haven't been through the dependency list.
I was experiencing a similar issue with:
Caused by: java.lang.IllegalStateException: Attempting to call unbound fn: #'compojure.core/wrap-context
I found that lein clean
and even finding the offending dependency were insufficient; I had to rm -rf $PROJECT_DIR/target
manually. After that, it worked with Compojure 1.2.1.
Right, after an extensive commenting session it turned out to be a transitive dependency pulled in by one of our other projects; turns out I don't understand how transitive dependencies work in Leiningen, but for anyone reading this in the future, it's not like Maven - the nearest dependency doesn't necessarily win. Thanks for the help, this wasn't a compojure issue.
Sorry for the long output in this post. If I try to use compojure above version 1.1.9 I get the following error (my
lein deps :tree
is below):Here's my
lein deps :tree
:I've tried playing around with all the ring versions and have added exclusions everywhere, but can't figure out how to get rid of this problem. It's fine on 1.1.9, but is broken on 1.2.0 and 1.2.1.