Open colonelrascals opened 6 years ago
Are you using JDK 9? It's an error specific to JDK 9 as I can see from the stacktrace. It should work on JDK8. Can you add the info regarding java -version
?
You can try adding the jvm opts to resolve this in JDK 9 if you cannot switch to JDK 8. Refer : https://github.com/http-kit/http-kit/issues/356#issuecomment-340307541 and https://www.deps.co/blog/how-to-upgrade-clojure-projects-to-use-java-9/
@tirkarthi
java -version
java version "10" 2018-03-20
Java(TM) SE Runtime Environment 18.3 (build 10+46)
Java HotSpot(TM) 64-Bit Server VM 18.3 (build 10+46, mixed mode)
Thanks. You can try switching to JDK 8 for now or add the jvm-opts as mentioned. I am still not sure about the dependency that causes this error.
I can fix this problem with adding environment variable, BOOT_JVM_OPTIONS="--add-modules=java.xml.bind" but adding that to .boot/boot.properties doesn't work
I fixed this by adding [org.clojure/clojurescript "1.10.238"]
before [adzerk/boot-cljs "2.1.4"]
.
So I went from:
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"html"}
:dependencies '[[adzerk/boot-cljs "2.1.4"]])
(require '[adzerk.boot-cljs :refer [cljs]])
to:
(set-env!
:source-paths #{"src/cljs"}
:resource-paths #{"html"}
:dependencies '[[org.clojure/clojurescript "1.10.238"]
[adzerk/boot-cljs "2.1.4"]])
(require '[adzerk.boot-cljs :refer [cljs]])
I also tried your suggestion nouse and couldn't fix it by adding that line to boot.properties.
Whoah, nice. Still had to do this but now it's working.
Just to confirm that the suggested solution to change dependencies to
:dependencies '[[org.clojure/clojurescript "1.10.238"]
[adzerk/boot-cljs "2.1.4"]])
works for java 11 as well
Just for clarification, is the solution to use a newer version of cljs?
looks like it
To fix (this and future tutorial issues) I updated dependencies to include http-kit, cider/piggieback,nrepl and other dependency versions.
:dependencies '[[http-kit "2.3.0"]
[org.clojure/clojure "1.10.0"]
[org.clojure/clojurescript "1.10.238"]
[adzerk/boot-cljs "2.1.5"]
[pandeiro/boot-http "0.8.3"]
[org.clojure/tools.nrepl "0.2.12"] ;;required in order to make boot-http works
[adzerk/boot-reload "0.6.0"]
[adzerk/boot-cljs-repl "0.4.0"]
[com.cemerick/piggieback "0.2.2"]
[weasel "0.7.0"]
[cider/piggieback "0.3.9" :scope "test"]
[nrepl "0.4.5" :scope "test"]])
Also note one needs to update boot.properties like below:
#Wed Feb 22 16:15:15 CET 2017
BOOT_CLOJURE_NAME=org.clojure/clojure
BOOT_CLOJURE_VERSION=1.10.0
BOOT_VERSION=2.8.2
exception below