This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2017-10-31
Channels
- # aws-lambda (4)
- # beginners (152)
- # boot (19)
- # cider (45)
- # cljs-dev (14)
- # clojure (54)
- # clojure-dev (33)
- # clojure-greece (11)
- # clojure-italy (4)
- # clojure-nl (8)
- # clojure-norway (2)
- # clojure-russia (6)
- # clojure-sg (1)
- # clojure-spec (1)
- # clojure-uk (40)
- # clojure-ukraine (5)
- # clojurescript (40)
- # community-development (13)
- # component (8)
- # core-async (3)
- # cursive (25)
- # data-science (11)
- # datomic (13)
- # duct (1)
- # emacs (2)
- # events (16)
- # figwheel (3)
- # fulcro (53)
- # graphql (2)
- # jobs (5)
- # jobs-rus (1)
- # juxt (10)
- # leiningen (4)
- # off-topic (82)
- # other-languages (5)
- # portkey (3)
- # protorepl (13)
- # re-frame (22)
- # reagent (15)
- # ring-swagger (4)
- # shadow-cljs (69)
- # spacemacs (7)
- # specter (16)
- # sql (13)
- # vim (5)
- # yada (2)
For some reason cider-connect
is now auto-filling the wrong port for a server I started with lein repl :headless
.
Is there a way to avoid the recent javax.xml.bind
exception when starting up a cider repl? https://dev.clojure.org/jira/browse/CLJS-2377
I see that there are some args that you can add in the repl command line, but I don’t know about Cider/Spacemacs
To be accurate; when I start a Cider cljs repl, I get the following exception:
2. Unhandled clojure.lang.Compiler$CompilerException
Error compiling cljs/util.cljc at (1:1)
Compiler.java: 7391 clojure.lang.Compiler/load
RT.java: 372 clojure.lang.RT/loadResourceScript
RT.java: 363 clojure.lang.RT/loadResourceScript
RT.java: 453 clojure.lang.RT/load
... loads of stacktrace lines omitted ...
java.util.concurrent.ThreadPoolExecutor/runWorker
ThreadPoolExecutor.java: 641 java.util.concurrent.ThreadPoolExecutor$Worker/run
Thread.java: 844 java.lang.Thread/run
1. Caused by java.lang.ClassNotFoundException
javax.xml.bind.DatatypeConverter
URLClassLoader.java: 466 java.net.URLClassLoader/findClass
DynamicClassLoader.java: 69 clojure.lang.DynamicClassLoader/findClass
ClassLoader.java: 563 java.lang.ClassLoader/loadClass
... loads of stacktrace lines omitted ...
i'm seeing
(defcustom cider-lein-global-options
nil
"Command global options used to execute Leiningen (e.g.: -o for offline)."
:type 'string
:group 'cider
:safe #'stringp)
how do I do that?
I’m not handy with elisp
(setq cider-lein-global-options “--add-modules java.xml.bind”)
you can look into dir-locals, which will only apply under a particular directory structure
maybe it’s OK that they’re global? 🙂
I’ll just give it a go
feedback in a min
apparently I don’t know how to add it properly to my .spacemacs
tried both init and config
You could also set in the top level of the project that needs this a file called .dir-locals.el
with the content
((nil . ((cider-lein-global-options . "--add-modules java.xml.bind"))))
^^^ this way, when checked in, it will work for anyone else using the project and emacs as well
hmmm
error in process sentinel: Could not start nREPL server: ‘--add-modules’ is not a task. See ‘lein \
help’.
@tanzoniteblack I’ll try your approach
^^^ Agreed, didn't realize this was a javac option
add to your jvm-opts
vector "--add-modules=java.xml.bind"
(or whatever the exact appropriate thing is) inside your project.clj
although you could look to see how cider slides in cider-nrepl and try to emulate that
so that this fix would happen for all of your projects until the fundamental fix is applied
I’m expecting the fix to go in soon, maybe foolishly. This is just for my hobby projects (until the same thing occurs at work, of course ; ) so I’ll live with the project.clj changes
let me give it a go
where do I put it in my project.clj?
don’t have a :jvm-opts
key there already
cheers
great success! 😄 😄 😄
Thank you so much, @dpsutton @tanzoniteblack!