@mikerod The result is the same. And after some more digging, I ran into this post (https://www.reddit.com/r/Clojure/comments/5f2ctk/cant_compile_java_sources_with_lein_javac/), and it is also referring some more sources, it points to the clojure's unconditional load of user.clj which transitively loading other clj files before javac
has a chance to run. Based on the information from that post, I'm able to fix my project, thank you very much for your help!
@lin.subscriber thanks for the link. I’ll have to read through it. But glad if you found a solution that works.
Hey guys, how are you? I am a noob who needs to make some commits on a existing project. When I try to run lein I get the following error:
Warning: implicit hook found: lein-environ.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Error loading nrepl.server: java.lang.RuntimeException: Unable to resolve symbol: volatile! in this context, compiling:(nrepl/middleware/print.clj:78:17)
Exception in thread "main" java.lang.ClassNotFoundException: nrepl.server, compiling:(/tmp/form-init2011741411756077488.clj:1:1657)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6651)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.access$100(Compiler.java:38)
at clojure.lang.Compiler$LetExpr$Parser.parse(Compiler.java:6050)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6644)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.analyze(Compiler.java:6406)
at clojure.lang.Compiler$BodyExpr$Parser.parse(Compiler.java:5782)
at clojure.lang.Compiler$FnMethod.parse(Compiler.java:5217)
at clojure.lang.Compiler$FnExpr.parse(Compiler.java:3846)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6642)
at clojure.lang.Compiler.analyze(Compiler.java:6445)
at clojure.lang.Compiler.eval(Compiler.java:6700)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.eval(Compiler.java:6693)
at clojure.lang.Compiler.load(Compiler.java:7130)
at clojure.lang.Compiler.loadFile(Compiler.java:7086)
at clojure.main$load_script.invoke(main.clj:274)
at clojure.main$init_opt.invoke(main.clj:279)
at clojure.main$initialize.invoke(main.clj:307)
at clojure.main$null_opt.invoke(main.clj:342)
at clojure.main$main.doInvoke(main.clj:420)
at clojure.lang.RestFn.invoke(RestFn.java:421)
at clojure.lang.Var.invoke(Var.java:383)
at clojure.lang.AFn.applyToHelper(AFn.java:156)
at clojure.lang.Var.applyTo(Var.java:700)
at clojure.main.main(main.java:37)
Caused by: java.lang.ClassNotFoundException: nrepl.server
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:61)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2065)
at clojure.lang.Compiler$HostExpr.maybeClass(Compiler.java:978)
at clojure.lang.Compiler$HostExpr.access$400(Compiler.java:756)
at clojure.lang.Compiler.macroexpand1(Compiler.java:6583)
at clojure.lang.Compiler.analyzeSeq(Compiler.java:6630)
... 27 more
REPL server launch timed out.
I already searched for this on google, but had no luck as the results redirect for a broken page
I am using arch linux and already tried different versions of lein, clojure and java
I have no ideia how to proceed but I can give any information needed to make it work. Thx a lot for the attention.clojure 1.10.0 Leiningen 2.9.1 on Java 1.8.0_202 OpenJDK 64-Bit Server VM
@clojurians038 do you have a ~/.lein/profiles.clj
file?
I think it’s more likely he has an old version of lein and some newer deps.
If Rafael’s Lein is 2.8.3 or newer such an error can possibly appear, so I’d speculate he’s using older Lein and needs to upgrade.
@bozhidar I thought he mentioned what versions in this thread and it was a newer lein. Maybe I read wrong.
clojure 1.10.0 Leiningen 2.9.1 on Java 1.8.0_202 OpenJDK 64-Bit Server VM This was what was posted for version info
Hmm, than it’s not possible for nrepl.server
to be missing (and I saw this is the root cause of the error).
Maybe some weird dep interactions indeed.
@bozhidar Yeah, it was strange to me. I thought maybe the older nrepl dep was on the classpath, but I think the ns name has changed, so it wouldn’t conflict with nrepl.server
right?
I have a project project.clj
but not a .lein/profiles.clj
Ok. Wondering if you have some old version of nrepl or cider-nrepl middleware in your dependencies.