After upgrading Leiningen (from v1.6 to v1.7) with lein upgrade
command lein swank
stopped working with error message:
Exception in thread "main" java.lang.NoClassDefFoundError:
Caused by: java.lang.ClassNotFoundException:
[...]
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
Could not find the main class: . Program will exit.
Since I tried it from command line, I believe Emacs configuration doesn't matter in this case. So I tried to re-install Leiningen completely. What I've done (using suggestions from here and error messages):
rm -R ~/.m2
# rm ~/.lein/plugins/*
lein self-install
(I used second line on second reinstallation only, so it is here for the sake of completeness)
Then I created new project and installed lein-swank plugin, since, as far as I understand, it is recommended way at the moment:
lein new test-project
lein plugin install swank-clojure 1.4.0 # I tried earlier version (1.3.2) too
And finally started lein swank with:
cd test-project
lein swank
But got same error as before.
So my questions are:
- How to fix this problem?
- Do I reinstall Leiningen correctly or some steps are missing?
UPD. Here's project.clj
generated with new project:
(defproject test-project "1.0.0-SNAPSHOT"
:description "FIXME: write description"
:dependencies [[org.clojure/clojure "1.3.0"]])