technomancy / leiningen

Moved to Codeberg; this is a convenience mirror
https://codeberg.org/leiningen/leiningen
Other
7.29k stars 1.61k forks source link

Lein repl failed caused by: java.lang.ClassNotFoundException: jdk.javadoc.doclet.Doclet #2785

Closed igajsin closed 2 years ago

igajsin commented 2 years ago

Hi,

there is a problem when I try to use leiningen on Gnu Guix. I believe something wrong with my setup, but I quite new in all: lein, clojure, java and guix worlds, so I need some help to mitigate the issue.

If I create a complete new project with lein new app my-stuff and then cd my-stuff; lein repl I receive an error.

Versions are:

$ lein version
Leiningen's classpath: :/gnu/store/h7kg2h67ifa3m90gc7cfgdqj2h9myk7m-leiningen-jar-2.9.8/share/leiningen-standalone.jar
Applying task version to []
Leiningen 2.9.8 on Java 17.0.1 OpenJDK 64-Bit Server VM

$ java -version
openjdk version "17.0.1" 2021-10-19
OpenJDK Runtime Environment (build 17.0.1+0-adhoc..source)
OpenJDK 64-Bit Server VM (build 17.0.1+0-adhoc..source, mixed mode, sharing)

$ clj --version
rlwrap: warning: could not set locale
warnings can be silenced by the --no-warnings (-n) option
Clojure CLI version 1.10.3.1040

Please, don't hesitate to ask if I can provide more data.

winks commented 2 years ago

I just had a brief look via

wget https://github.com/technomancy/leiningen/raw/2.9.8/bin/lein
chmod +x lein
docker run -it --rm -v "$PWD:/mnt" -v "$PWD/m2:/root/.m2" openjdk:17.0-jdk /bin/bash
cd /mnt
./lein ...

so there doesn't seem to be a general problem with Java 17 (which isn't too common I guess).

Unfortunately I don't even have any wild guesses to the reason right now. Could you maybe try a different JDK on guix? 11 or 8, if they have that.

technomancy commented 2 years ago

The error you posted comes from Cider, so perhaps you should open a bug report on their tracker: Syntax error compiling at (cider/nrepl/inlined_deps/orchard/v0v6v5/orchard/java/parser.clj:1:1).

igajsin commented 2 years ago

Strange. That happened in CLI without cider. I'll try to delete cider and check what will happen after that.

igajsin commented 2 years ago

I've switched to icedtea

$ java -version
openjdk version "1.8.0_292"
OpenJDK Runtime Environment (IcedTea 3.19.0) (guix build 1.8.0_292-b10)
OpenJDK 64-Bit Server VM (build 25.292-b10, mixed mode)

and at first glance lein works properly. Tomorrow I can test it better.

technomancy commented 2 years ago

Sounds like this is no longer a problem? We can reopen if more debugging is needed.

technomancy commented 2 years ago

It sounds like it would be best to report this to Orchard's issue tracker then? I don't know if they'll be able to work around the problem, but perhaps at least they can give a more useful error message that would point people to the root cause of the problem.