进程哨兵错误:无法启动nREPL服务器:java.lang.NumberFormatException:无效的数字 [英] error in process sentinel: Could not start nREPL server: java.lang.NumberFormatException: Invalid number

查看:68
本文介绍了进程哨兵错误:无法启动nREPL服务器:java.lang.NumberFormatException:无效的数字的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已经研究了所有关于堆栈溢出的类似问题.这个差异足够大,可以提出一个单独的问题.基本上,我无法启动repl服务器,因为出现以下错误.有人指出,这通常是一个依赖关系问题,但是据我所知,我已经更新了.我这是怎么了?这是完整的错误:

I've looked at all of the similar questions on stack overflow. This one is different enough to warrant a separate question. Basically, I can't start a repl server because I get the error below. It's been pointed out that this is typically a dependency issue, but I'm updated, to my knowledge. What am I getting wrong here? Here's the full error:

error in process sentinel: Could not start nREPL server: java.lang.NumberFormatException: Invalid number: 0.8.3
 at clojure.lang.LispReader.readNumber (LispReader.java:352)
    clojure.lang.LispReader.read (LispReader.java:278)
    clojure.lang.LispReader.readDelimitedList (LispReader.java:1398)
    clojure.lang.LispReader$VectorReader.invoke (LispReader.java:1347)
    clojure.lang.LispReader.read (LispReader.java:285)
    clojure.lang.LispReader.read (LispReader.java:216)
    clojure.lang.LispReader.read (LispReader.java:205)
    clojure.lang.RT.readString (RT.java:1878)
    clojure.lang.RT.readString (RT.java:1873)
    clojure.core$read_string.invokeStatic (core.clj:3815)
    clojure.core$read_string.invoke (core.clj:3805)
    clojure.core$mapv$fn__8445.invoke (core.clj:6912)
    clojure.core.protocols$fn__8159.invokeStatic (protocols.clj:168)
    clojure.core.protocols/fn (protocols.clj:124)
    clojure.core.protocols$fn__8114$G__8109__8123.invoke (protocols.clj:19)
    clojure.core.protocols$seq_reduce.invokeStatic (protocols.clj:31)
    clojure.core.protocols$fn__8146.invokeStatic (protocols.clj:75)
    clojure.core.protocols/fn (protocols.clj:75)
    clojure.core.protocols$fn__8088$G__8083__8101.invoke (protocols.clj:13)
    clojure.core$reduce.invokeStatic (core.clj:6828)
    clojure.core$mapv.invokeStatic (core.clj:6903)
    clojure.core$mapv.invoke (core.clj:6903)
    leiningen.update_in$parse_args.invokeStatic (update_in.clj:13)
    leiningen.update_in$parse_args.invoke (update_in.clj:9)
    leiningen.update_in$update_in.invokeStatic (update_in.clj:36)
    leiningen.update_in$update_in.doInvoke (update_in.clj:24)
    clojure.lang.RestFn.applyTo (RestFn.java:146)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$partial_task$fn__7331.doInvoke (main.clj:284)
    clojure.lang.RestFn.applyTo (RestFn.java:139)
    clojure.lang.AFunction$1.doInvoke (AFunction.java:31)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.core$apply.invokeStatic (core.clj:667)
    clojure.core$apply.invoke (core.clj:660)
    leiningen.core.main$apply_task.invokeStatic (main.clj:334)
    leiningen.core.main$apply_task.invoke (main.clj:320)
    leiningen.core.main$resolve_and_apply.invokeStatic (main.clj:343)
    leiningen.core.main$resolve_and_apply.invoke (main.clj:336)
    leiningen.core.main$_main$fn__7420.invoke (main.clj:453)
    leiningen.core.main$_main.invokeStatic (main.clj:442)
    leiningen.core.main$_main.doInvoke (main.clj:439)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.core$apply.invokeStatic (core.clj:665)
    clojure.main$main_opt.invokeStatic (main.clj:514)
    clojure.main$main_opt.invoke (main.clj:510)
    clojure.main$main.invokeStatic (main.clj:664)
    clojure.main$main.doInvoke (main.clj:616)
    clojure.lang.RestFn.applyTo (RestFn.java:137)
    clojure.lang.Var.applyTo (Var.java:705)
    clojure.main.main (main.java:40)

所以我在这个问题上走得更远,我认为我要谈的是最后一两个小问题.被拉出并导致java.lang.NumberFormatException的文件是cider.el,您可以在emacs.emacs.d \ elpa \ cider- [版本号,以我为例20210104.915]中查找.打开cider.el文件,并在第392/393行中,在此版本中,您将找到:

So I've gotten farther on this problem and I think I'm down to the last little issue or two. The file that is being pulled that causes the java.lang.NumberFormatException is cider.el which you can finder in your emacs.emacs.d\elpa\cider-[VERSION NUMBER, in my case 20210104.915]. You open your cider.el file and on line 392/393, in this version, you'll find:

(苹果酒添加到苹果酒依赖中""nrepl/nrepl";"0.8.3")

(cider-add-to-alist 'cider-jack-in-dependencies "nrepl/nrepl" "0.8.3")

因此,更改此行,重新编译,然后重新加载emacs,得到的数字将引发java.lang.NumberFormatException更改为我更改的内容(通过使用byte-compile-file进行重新编译,按回车,然后将其传递给地址文件).添加另一组双引号会得到排序的空值错误(很明显),并对异常和排序进行任何类型的反斜杠似乎都无法解决问题.因此,由于一些相关的文章(尽管细节较少)似乎暗示了更改版本号,因此,我将不得不假定必须这样做.哪个版本号在这里效果最好?

So changing this line, recompiling it, and reloading emacs gets the number throwing the java.lang.NumberFormatException to change to whatever I changed it to (recompile by using byte-compile-file, hitting enter, then passing it the address of the document). Adding another set of double quotes gets a null value error of sorts (obviously) and doing any type of backslashing for exceptions and sort doesn't seem to solve the issue. So, since the few related posts (though with much less detail) seem to hint at changing the version number, I'm going to have to assume that I have to do that. What version number would work best here?

非常短的温度解决方案:

TEMP SOLUTION SO FAR:

用"lein repl"开始一个副本.在命令行中,并使用连接命令"cider-connect"手动连接到它.并指定localhost(我在与project相同的目录中启动了repl,它很容易检测到它).作为永久性解决方案,这对我来说还不够好,但是让我起床并暂时走直到找到更好的解决方案为止.

start a repl with "lein repl" in command line and connect to it manually using the connect command "cider-connect" and specifying the localhost (I started the repl in same directory as project and it detected it easily). This is not good enough for me as a permanent solution but gets me up and going temporarily until a better solution is found.

永久解决方案:

见下文

推荐答案

查看您的依赖项.我有一个问题,我的Java jdk基本上坏了(就代码而言,是Java的错,不是我的错).我最终使用了最新的OpenJDK(第15号).那行得通.如果遇到很多Java特定类型的错误,并且这些错误随所使用的版本而变化,请考虑更新Java jdk.我以前使用的是LTE版本,而最新版本则对其进行了修复.

Look at your dependencies. I had an issue where my java jdk was basically broken (java's fault, not mine, in so far as the code is concerned). I ended up using the latest OpenJDK (number 15). That worked. If you get lots of java specific type errors and those errors change with the versions that you're using, then consider updating your java jdk. I was using LTE versions before and the latest fixed it.

这篇关于进程哨兵错误:无法启动nREPL服务器:java.lang.NumberFormatException:无效的数字的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
相关文章
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆