luminus-framework/luminus

(Web development with Clojure): CompilerException java.lang.ClassNotFoundException: nrepl.core

endrebak opened this issue · 4 comments

I am getting the following error following the first guestbook tutorial in Web Development with Clojure 2 (page 21 in the epub):

lein repl :connect 7000
Warning: implicit hook found: lein-cprop.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Connecting to nREPL at 127.0.0.1:7000
CompilerException java.lang.ClassNotFoundException: nrepl.core, compiling:(/private/var/folders/ld/dnys24ds0612rkybkfyhcsnm0000gn/T/form-init6758911398700405513.clj:1:82)
#object[clojure.lang.Namespace 0x56ec9ff "user"]
Error loading namespace; falling back to user
nil
user=> Bye for now!

This is the startup messages from lein run:

Warning: implicit hook found: lein-cprop.plugin/hooks
Hooks are deprecated and will be removed in a future version.
[2019-02-06 14:46:10,075][DEBUG][org.jboss.logging] Logging Provider: org.jboss.logging.Log4jLoggerProvider
[2019-02-06 14:46:10,648][INFO][guestbook.env]
-=[guestbook started successfully using the development profile]=-
[2019-02-06 14:46:10,755][INFO][luminus.http-server] starting HTTP server on port 3000
[2019-02-06 14:46:10,803][INFO][org.xnio] XNIO version 3.4.0.Beta1
[2019-02-06 14:46:10,912][INFO][org.xnio.nio] XNIO NIO Implementation Version 3.4.0.Beta1
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.xnio.nio.NioXnio$2 (file:/Users/endrebakkenstovner/.m2/repository/org/jboss/xnio/xnio-nio/3.4.0.Beta1/xnio-nio-3.4.0.Beta1.jar) to constructor sun.nio.ch.KQueueSelectorProvider()
WARNING: Please consider reporting this to the maintainers of org.xnio.nio.NioXnio$2
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
[2019-02-06 14:46:11,001][INFO][org.projectodd.wunderboss.web.Web] Registered web context /
[2019-02-06 14:46:11,002][INFO][luminus.repl-server] starting nREPL server on port 7000
[2019-02-06 14:46:11,021][INFO][guestbook.core] #'guestbook.config/env started
[2019-02-06 14:46:11,021][INFO][guestbook.core] #'guestbook.handler/init-app started
[2019-02-06 14:46:11,021][INFO][guestbook.core] #'guestbook.core/http-server started
[2019-02-06 14:46:11,022][INFO][guestbook.core] #'guestbook.core/repl-server started
[2019-02-06 14:46:11,022][INFO][guestbook.core] #'guestbook.core/log started

This is the lein version:

lein --version
Warning: implicit hook found: lein-cprop.plugin/hooks
Hooks are deprecated and will be removed in a future version.
Leiningen 2.8.3 on Java 10.0.2 Java HotSpot(TM) 64-Bit Server VM

Any idea what might be wrong? And where do you prefer me to post problems I encounter working through the book? Should I post them somewhere else? Thanks.

I'm not able to reproduce the issue locally. One thing to take a look at would be if you have any plugins in your ~/.lein/profiles.clj file that might cause a conflict.

(Note to self and others) This seems related: luminus-framework/luminus-template#394

What worked for me:

;; ~/.lein/profiles.clj
{:user {:plugins [[luminus/lein-template "2.9.10.74"]
                  [nrepl/lein-nrepl "0.3.2"]]}} # new

And instead of lein repl :connect 7000 do lein nrepl :connect 7000.

Ah makes sense, I forgot that the book pins the template to an older version.