莱宁根REPL问题

时间:2014-08-29 23:54:41

标签: clojure leiningen

我刚刚使用我的Ubuntu 14.04系统的安装脚本安装了Leiningen 2.4.3。当我尝试使用lein进入REPL时,我得到一个相当讨厌的转储到控制台:

charles@charles-930X5J-910S5J-940X5J:~$ lein repl nREPL server started on port 60889 on host 127.0.0.1 - nrepl://127.0.0.1:60889 Exception in thread "nREPL-worker-0" java.lang.NoSuchMethodError: clojure.tools.nrepl.StdOutBuffer.length()I at clojure.tools.nrepl.middleware.session$session_out$fn__7630.doInvoke(session.clj:43) at clojure.lang.RestFn.invoke(RestFn.java:460) at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$ff19274a.write(Unknown Source) at java.io.PrintWriter.write(PrintWriter.java:456) at java.io.PrintWriter.write(PrintWriter.java:473) at clojure.core$fn__5471.invoke(core_print.clj:191) at clojure.lang.MultiFn.invoke(MultiFn.java:231) at clojure.core$pr_on.invoke(core.clj:3392) at clojure.core$pr.invoke(core.clj:3404) at clojure.lang.AFn.applyToHelper(AFn.java:154) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.core$apply.invoke(core.clj:624) at clojure.core$prn.doInvoke(core.clj:3437) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:624) at clojure.core$println.doInvoke(core.clj:3457) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.main$repl_caught.invoke(main.clj:158) at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__7569$fn__7582.invoke(interruptible_eval.clj:76) at clojure.main$repl$fn__6634.invoke(main.clj:259) at clojure.main$repl.doInvoke(main.clj:257) at clojure.lang.RestFn.invoke(RestFn.java:1096) at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__7569.invoke(interruptible_eval.clj:56) at clojure.lang.AFn.applyToHelper(AFn.java:152) at clojure.lang.AFn.applyTo(AFn.java:144) at clojure.core$apply.invoke(core.clj:624) at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1862) at clojure.lang.RestFn.invoke(RestFn.java:425) at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:41) at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__7610$fn__7613.invoke(interruptible_eval.clj:171) at clojure.core$comp$fn__4192.invoke(core.clj:2402) at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__7603.invoke(interruptible_eval.clj:138) at clojure.lang.AFn.run(AFn.java:22) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745) REPL-y 0.3.2, nREPL 0.2.0-beta5NoSuchMethodError clojure.tools.nrepl.StdOutBuffer.length()I clojure.tools.nrepl.middleware.session/session-out/fn--7630 (session.clj:43)NoSuchMethodError clojure.tools.nrepl.StdOutBuffer.length()I clojure.tools.nrepl.middleware.session/session-out/fn--7630 (session.clj:43)#Exception in thread "nREPL-worker-1" java.lang.NoSuchMethodError: clojure.tools.nrepl.StdOutBuffer.length()I at clojure.tools.nrepl.middleware.session$session_out$fn__7630.doInvoke(session.clj:43) at clojure.lang.RestFn.invoke(RestFn.java:460) at clojure.tools.nrepl.middleware.session.proxy$java.io.Writer$ff19274a.write(Unknown Source) at java.io.PrintWriter.write(PrintWriter.java:456) at java.io.PrintWriter.write(PrintWriter.java:473) at clojure.core$fn__5471.invoke(core_print.clj:191) at clojure.lang.MultiFn.invoke(MultiFn.java:231) at clojure.core$pr_on.invoke(core.clj:3392) at clojure.core$pr.invoke(core.clj:3404) at clojure.lang.AFn.applyToHelper(AFn.java:154) at clojure.lang.RestFn.applyTo(RestFn.java:132) at clojure.core$apply.invoke(core.clj:624) at clojure.core$prn.doInvoke(core.clj:3437) at clojure.lang.RestFn.applyTo(RestFn.java:137) at clojure.core$apply.invoke(core.clj:624) at clojure.core$println.doInvoke(core.clj:3457) at clojure.lang.RestFn.invoke(RestFn.java:408) at clojure.main$repl_caught.invoke(main.clj:158) at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__7569$fn__7582.invoke(interruptible_eval.clj:76) at clojure.main$repl$fn__6634.invoke(main.clj:259) at clojure.main$repl.doInvoke(main.clj:257) at clojure.lang.RestFn.invoke(RestFn.java:1096) at clojure.tools.nrepl.middleware.interruptible_eval$evaluate$fn__7569.invoke(interruptible_eval.clj:56) at clojure.lang.AFn.applyToHelper(AFn.java:152) at clojure.lang.AFn.applyTo(AFn.java:144) at clojure.core$apply.invoke(core.clj:624) at clojure.core$with_bindings_STAR_.doInvoke(core.clj:1862) at clojure.lang.RestFn.invoke(RestFn.java:425) at clojure.tools.nrepl.middleware.interruptible_eval$evaluate.invoke(interruptible_eval.clj:41) at clojure.tools.nrepl.middleware.interruptible_eval$interruptible_eval$fn__7610$fn__7613.invoke(interruptible_eval.clj:171) at clojure.core$comp$fn__4192.invoke(core.clj:2402) at clojure.tools.nrepl.middleware.interruptible_eval$run_next$fn__7603.invoke(interruptible_eval.clj:138) at clojure.lang.AFn.run(AFn.java:22) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)

Error loading namespace; falling back to userNoSuchMethodError clojure.tools.nrepl.StdOutBuffer.length()I clojure.tools.nrepl.middleware.session/session-out/fn--7630 (session.clj:43)NoSuchMethodError clojure.tools.nrepl.StdOutBuffer.length()I clojure.tools.nrepl.middleware.session/session-out/fn--7630 (session.clj:43)user=>

我需要一些帮助来解释这意味着什么以及如何解决它。运行JDK 1.8.0_20

1 个答案:

答案 0 :(得分:4)

这是lein 2.4.3的已知错误。在新的稳定版本可用之前,可以通过运行以下代码来修复它: lein upgrade 2.4.2。此外,此问题仅出现在无项目的repl中,如果您创建一个新项目,并从项目目录中运行lein,则不会发生错误。