Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java error while running lein run command (Cannot invoke "java.lang.Character.charValue()" because "x" is null) #3

Open
zekzekus opened this issue Aug 13, 2023 · 5 comments

Comments

@zekzekus
Copy link

When I try lein run command I got the error below πŸ‘‡ Might there be a version mismatch for one of the primary component?

❯ javac -version
javac 17

❯ java --version
openjdk 17 2021-09-14
OpenJDK Runtime Environment (build 17+35-2724)
OpenJDK 64-Bit Server VM (build 17+35-2724, mixed mode, sharing)

❯ clojure --version
Clojure CLI version 1.11.1.1347

❯ lein run
2023-08-13 09:29:50,339 [main] ERROR luminus.http-server - server failed to start on port
java.lang.NullPointerException: Cannot invoke "java.lang.Character.charValue()" because "x" is null
        at clojure.lang.RT.uncheckedIntCast(RT.java:1473)
        at aleph.http.server$start_server.invokeStatic(server.clj:650)
        at aleph.http.server$start_server.invoke(server.clj:584)
        at aleph.http$start_server.invokeStatic(http.clj:60)
        at aleph.http$start_server.invoke(http.clj:27)
        at luminus.http_server$start.invokeStatic(http_server.clj:19)
        at luminus.http_server$start.invoke(http_server.clj:15)
        at enion_backend.core$eval28069$fn__28070.invoke(core.clj:27)
        at mount.core$record_BANG_.invokeStatic(core.cljc:74)
        at mount.core$record_BANG_.invoke(core.cljc:73)
        at mount.core$up$fn__457.invoke(core.cljc:81)
        at mount.core$up.invokeStatic(core.cljc:80)
        at mount.core$up.invoke(core.cljc:78)
        at mount.core$bring.invokeStatic(core.cljc:247)
        at mount.core$bring.invoke(core.cljc:239)
        at mount.core$start.invokeStatic(core.cljc:289)
        at mount.core$start.doInvoke(core.cljc:281)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at mount.core$start_with_args.invokeStatic(core.cljc:389)
        at mount.core$start_with_args.doInvoke(core.cljc:385)
        at clojure.lang.RestFn.invoke(RestFn.java:410)
        at enion_backend.core$start_app.invokeStatic(core.clj:52)
        at enion_backend.core$start_app.invoke(core.clj:50)
        at enion_backend.core$_main.invokeStatic(core.clj:61)
        at enion_backend.core$_main.doInvoke(core.clj:59)
        at clojure.lang.RestFn.invoke(RestFn.java:397)
        at clojure.lang.Var.invoke(Var.java:380)
        at user$eval28228.invokeStatic(form-init4819466814356749574.clj:1)
        at user$eval28228.invoke(form-init4819466814356749574.clj:1)
        at clojure.lang.Compiler.eval(Compiler.java:7194)
        at clojure.lang.Compiler.eval(Compiler.java:7184)
        at clojure.lang.Compiler.load(Compiler.java:7653)
        at clojure.lang.Compiler.loadFile(Compiler.java:7591)
        at clojure.main$load_script.invokeStatic(main.clj:475)
        at clojure.main$init_opt.invokeStatic(main.clj:477)
        at clojure.main$init_opt.invoke(main.clj:477)
        at clojure.main$initialize.invokeStatic(main.clj:508)
        at clojure.main$null_opt.invokeStatic(main.clj:542)
        at clojure.main$null_opt.invoke(main.clj:539)
        at clojure.main$main.invokeStatic(main.clj:664)
        at clojure.main$main.doInvoke(main.clj:616)
        at clojure.lang.RestFn.applyTo(RestFn.java:137)
        at clojure.lang.Var.applyTo(Var.java:705)
        at clojure.main.main(main.java:40)
Execution error (NullPointerException) at aleph.http.server/start-server (server.clj:650).
Cannot invoke "java.lang.Character.charValue()" because "x" is null

Full report at:
/var/folders/60/_zgg1c651tnc50r884s_w25w0000gn/T/clojure-6436788271937974564.edn
@ertugrulcetin
Copy link
Owner

Could you try with OpenJDK 14 (e.g. 14.0.2), could be third party lib's problem aleph

@ertugrulcetin
Copy link
Owner

@zekzekus is it resolved?

@zekzekus
Copy link
Author

@zekzekus is it resolved?

I couldn't convince myself to install idk 14 which is not included with default asdf Java plugin by hand. Any other version suggestions? :)

@ertugrulcetin
Copy link
Owner

JDK 8 maybe

@john-shaffer
Copy link

Try lein run -p 3000

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants