This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2021-07-02
Channels
- # announcements (9)
- # asami (5)
- # babashka (16)
- # beginners (134)
- # chlorine-clover (3)
- # cider (15)
- # clojure (75)
- # clojure-australia (3)
- # clojure-europe (29)
- # clojure-nl (2)
- # clojure-uk (15)
- # clojured (4)
- # clojurescript (34)
- # cursive (9)
- # datomic (16)
- # duct (7)
- # events (4)
- # fulcro (2)
- # helix (5)
- # honeysql (4)
- # jobs (9)
- # lsp (55)
- # malli (31)
- # music (3)
- # re-frame (3)
- # reitit (1)
- # remote-jobs (1)
- # ring (3)
- # sci (5)
- # shadow-cljs (46)
- # specter (3)
- # tools-deps (60)
- # vim (5)
- # xtdb (15)
Has anyone seen errors like this when running cider-test-run-ns-tests
?
Exception in thread "nREPL-session-3617ec79-0596-4ce9-b55b-c34ff8f26ba5" java.lang.IllegalArgumentException: no conversion to symbol
at clojure.core$symbol.invokeStatic(core.clj:598)
at clojure.core$symbol.invoke(core.clj:591)
at cider.nrepl.middleware.test$report_fixture_error.invokeStatic(test.clj:193)
at cider.nrepl.middleware.test$report_fixture_error.invoke(test.clj:183)
...
ERROR: Unhandled REPL handler exception processing message {:op eldoc, :ns user, :sym nrepl.middleware.session$session_exec$main_loop__1062.invoke, :session 3617ec79-0596-4ce9-b55b-c34ff8f26ba5, :id 12}
java.lang.ClassNotFoundException: com.sun.tools.javac.util.List
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2212)
at clojure.lang.RT.classForName(RT.java:2221)
at cider.nrepl.inlined_deps.orchard.v0v6v4.orchard.java.legacy_parser$parse_java.invokeStatic(legacy_parser.clj:88)
at cider.nrepl.inlined_deps.orchard.v0v6v4.orchard.java.legacy_parser$parse_java.invoke(legacy_parser.clj:66)
When that happens, my repl freezes until I run sesman-restart
.
Here's my setup.
deps.edn:
{:paths ["test"]
:deps {org.clojure/clojure {:mvn/version "1.10.3"}}
:aliases {:cider-clj {:extra-deps {nrepl/nrepl {:mvn/version "0.8.3"}
refactor-nrepl/refactor-nrepl {:mvn/version "2.5.0"}
cider/cider-nrepl {:mvn/version "0.25.8"}}
:main-opts ["-m" "nrepl.cmdline" "--middleware" "[\"refactor-nrepl.middleware/wrap-refactor\",\"cider.nrepl/cider-middleware\"]"]}}}
test/foo-test.clj:
(ns foo-test
(:require [clojure.test :refer :all]))
(deftest bar
(testing "scope"
(let [a (/ 1 0)]
(is (= a 0)))))
(comment
;; these work as expected and display a Divide by zero exception in a test output format
(bar)
(run-tests)
)
Also, here's my CIDER and java versions:
;; CIDER 1.1.0snapshot (package: 20210127.640), nREPL 0.8.3
;; Clojure 1.10.3, Java 1.8.0_141
I should probably also mention, I'm starting it with clj -M:cider-clj
and connecting with cider-connect-clj
Check for exceptions in your fixture(s)
Thanks for the response. I did see that one, but I'm not using any fixtures. It does seem very similar. The code I posted is all that's needed to cause it. Perhaps let bindings are treated as fixtures somehow? 🤷
What version of Java are you using?
com.sun.tools.javac.util.List
I think changed in some way between 8 and 9your deps.edn
does not peg a version of orchard
I wonder where your orchard
dependency is coming from
are you using the "jack-in" approach (even though you have the cider-nrepl stuff declared explicitly)?
the stack trace shows that cider.nrepl.inlined_deps.orchard.v0v6v4.orchard.java.legacy_parser$parse_java
is trying to use this class that changed between java versions
so perhaps you are using a new orchard
with an old JVM
Upgrading java completely fixed it! I have no idea what version of orchard is being used. I tried looking at the dependency graph with tools.deps.graph
, but orchard didn't show up. 🤷 Still, it all works with java 11. Thanks so much for your help @UC681SR17!! 😄