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

Orchard error on thrown error: java.lang.ClassNotFoundException: com.sun.tools.javac.util.List #105

Closed
danielneal opened this issue Feb 2, 2021 · 5 comments · Fixed by #140

Comments

@danielneal
Copy link

danielneal commented Feb 2, 2021

Expected behavior

(throw (ex-info "Help!" {}) should be handled by cider and show cider-error

Actual behavior

Execution error (ExceptionInfo) at user/eval9510 (REPL:1265).
Helo!
ERROR: Unhandled REPL handler exception processing message {:nrepl.middleware.print/stream? 1, :nrepl.middleware.print/print cider.nrepl.pprint/pprint, :nrepl.middleware.print/quota 1048576, :nrepl.middleware.print/buffer-size 4096, :nrepl.middleware.print/options {:right-margin 70}, :op stacktrace, :session a739d2ab-eec5-42ae-8e35-01b1ea428624, :id 234}
java.lang.ClassNotFoundException: com.sun.tools.javac.util.List
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at clojure.lang.DynamicClassLoader.findClass(DynamicClassLoader.java:69)
at java.lang.ClassLoader.loadClass(ClassLoader.java:418)
at clojure.lang.DynamicClassLoader.loadClass(DynamicClassLoader.java:77)
at java.lang.ClassLoader.loadClass(ClassLoader.java:351)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
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)

Steps to reproduce the problem

  1. Set up a new tools.deps project.
  2. Throw an error

Environment & Version information

Clojure version

1.10.1

Java version

java -version
openjdk version "1.8.0_275"
OpenJDK Runtime Environment (AdoptOpenJDK)(build 1.8.0_275-b01)

Operating system

Mac OS X 10.15.7

Emacs version

GNU Emacs 27.1 (build 1, x86_64-apple-darwin19.6.0, Carbon Version 162 AppKit 1894.6) of 2021-02-02

Notes

The class it's looking for is in tools.jar, which is in $JAVA_HOME/lib.

@danielneal danielneal changed the title Error when resporting errors: java.lang.ClassNotFoundException: com.sun.tools.javac.util.List Orchard error on thrown error: java.lang.ClassNotFoundException: com.sun.tools.javac.util.List Feb 2, 2021
@danielneal
Copy link
Author

Downgrading to Cider 1.0.0 from melpa stable fixed the problem.
I was on 20210201.838.

@bbatsov
Copy link
Member

bbatsov commented Feb 12, 2021

Probably the issue is something to do with the fix for #103.

@futuro
Copy link

futuro commented Feb 16, 2021

I got a similar issue printed to my repl when my emacs tries to generate completions (I think). Here's the details

Stacktrace

com.sun.tools.javac.util.List
java.lang.ClassNotFoundException: com.sun.tools.javac.util.List
 at java.net.URLClassLoader.findClass (URLClassLoader.java:382)
    clojure.lang.DynamicClassLoader.findClass (DynamicClassLoader.java:69)
    java.lang.ClassLoader.loadClass (ClassLoader.java:418)
    clojure.lang.DynamicClassLoader.loadClass (DynamicClassLoader.java:77)
    java.lang.ClassLoader.loadClass (ClassLoader.java:351)
    java.lang.Class.forName0 (Class.java:-2)
    java.lang.Class.forName (Class.java:348)
    clojure.lang.RT.classForName (RT.java:2211)
    clojure.lang.RT.classForName (RT.java:2220)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$parse_java.invokeStatic (legacy_parser.clj:88)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$parse_java.invoke (legacy_parser.clj:66)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$source_info.invokeStatic (legacy_parser.clj:274)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java.legacy_parser$source_info.invoke (legacy_parser.clj:265)
    clojure.lang.Var.invoke (Var.java:384)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$source_info.invokeStatic (java.clj:144)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$source_info.invoke (java.clj:139)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info_STAR_.invokeStatic (java.clj:223)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info_STAR_.invoke (java.clj:214)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info.invokeStatic (java.clj:261)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$class_info.invoke (java.clj:253)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_class.invokeStatic (java.clj:340)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_class.invoke (java.clj:331)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_symbol.invokeStatic (java.clj:371)
    cider.nrepl.inlined_deps.orchard.v0v6v5.orchard.java$resolve_symbol.invoke (java.clj:357)
    cider.nrepl.middleware.stacktrace$analyze_fn.invokeStatic (stacktrace.clj:84)
    cider.nrepl.middleware.stacktrace$analyze_fn.invoke (stacktrace.clj:63)
    clojure.core$comp$fn__5807.invoke (core.clj:2569)
    clojure.core$comp$fn__5807.invoke (core.clj:2569)
    clojure.core$comp$fn__5807.invoke (core.clj:2569)
    cider.nrepl.middleware.stacktrace$analyze_frame.invokeStatic (stacktrace.clj:180)
    cider.nrepl.middleware.stacktrace$analyze_frame.invoke (stacktrace.clj:177)
    clojure.core$map$fn__5866.invoke (core.clj:2755)
    clojure.lang.LazySeq.sval (LazySeq.java:42)
    clojure.lang.LazySeq.seq (LazySeq.java:51)
    clojure.lang.LazySeq.first (LazySeq.java:73)
    clojure.lang.RT.first (RT.java:692)
    clojure.core$first__5384.invokeStatic (core.clj:55)
    clojure.core/first (core.clj:55)
    cider.nrepl.middleware.stacktrace$flag_duplicates.invokeStatic (stacktrace.clj:168)
    cider.nrepl.middleware.stacktrace$flag_duplicates.invoke (stacktrace.clj:164)
    cider.nrepl.middleware.stacktrace$analyze_stacktrace.invokeStatic (stacktrace.clj:186)
    cider.nrepl.middleware.stacktrace$analyze_stacktrace.invoke (stacktrace.clj:182)
    cider.nrepl.middleware.stacktrace$analyze_cause.invokeStatic (stacktrace.clj:290)
    cider.nrepl.middleware.stacktrace$analyze_cause.invoke (stacktrace.clj:281)
    cider.nrepl.middleware.stacktrace$analyze_causes$fn__10140.invoke (stacktrace.clj:315)
    clojure.core$map$fn__5862$fn__5863.invoke (core.clj:2742)
    clojure.core$take_while$fn__5913$fn__5914.invoke (core.clj:2901)
    clojure.lang.Iterate.reduce (Iterate.java:81)
    clojure.core$transduce.invokeStatic (core.clj:6883)
    clojure.core$into.invokeStatic (core.clj:6899)
    clojure.core$into.invoke (core.clj:6887)
    cider.nrepl.middleware.stacktrace$analyze_causes.invokeStatic (stacktrace.clj:314)
    cider.nrepl.middleware.stacktrace$analyze_causes.invoke (stacktrace.clj:306)
    clojure.lang.Var.invoke (Var.java:388)
    cider.nrepl.middleware.util.error_handling$pp_stacktrace.invokeStatic (error_handling.clj:44)
    cider.nrepl.middleware.util.error_handling$pp_stacktrace.invoke (error_handling.clj:39)
    cider.nrepl.middleware.util.error_handling$base_error_response.invokeStatic (error_handling.clj:54)
    cider.nrepl.middleware.util.error_handling$base_error_response.doInvoke (error_handling.clj:46)
    clojure.lang.RestFn.invoke (RestFn.java:425)
    cider.nrepl.middleware.util.error_handling$eval6666$fn__6667.invoke (error_handling.clj:129)
    clojure.lang.MultiFn.invoke (MultiFn.java:239)
    cider.nrepl.middleware.util.error_handling$eval6678$fn__6679.invoke (error_handling.clj:140)
    clojure.lang.MultiFn.invoke (MultiFn.java:239)
    cider.nrepl.middleware.util.error_handling$eval6682$fn__6683.invoke (error_handling.clj:143)
    clojure.lang.MultiFn.invoke (MultiFn.java:239)
    cider.nrepl.middleware.info$handle_info.invokeStatic (info.clj:96)
    cider.nrepl.middleware.info$handle_info.invoke (info.clj:95)
    clojure.lang.Var.invoke (Var.java:388)
    cider.nrepl$wrap_info$fn__6449.invoke (nrepl.clj:203)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    cider.nrepl$wrap_macroexpand$fn__6467.invoke (nrepl.clj:272)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    com.billpiel.sayid.nrepl_middleware$wrap_sayid$fn__6255.invoke (nrepl_middleware.clj:577)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    cider.nrepl$wrap_inspect$fn__6459.invoke (nrepl.clj:222)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    nrepl.middleware.sideloader$wrap_sideloader$fn__1542.invoke (sideloader.clj:104)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    cider.nrepl$wrap_complete$fn__6415.invoke (nrepl.clj:139)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    cider.nrepl$wrap_test$fn__6531.invoke (nrepl.clj:427)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    nrepl.middleware.session$session$fn__1091.invoke (session.clj:309)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    nrepl.middleware.caught$wrap_caught$fn__926.invoke (caught.clj:97)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    nrepl.middleware.print$wrap_print$fn__893.invoke (print.clj:234)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    cider.nrepl$wrap_clojuredocs$fn__6581.invoke (nrepl.clj:511)
    nrepl.middleware$wrap_conj_descriptor$fn__658.invoke (middleware.clj:16)
    nrepl.server$default_handler$fn__1586.invoke (server.clj:130)
    nrepl.server$handle_STAR_.invokeStatic (server.clj:22)
    nrepl.server$handle_STAR_.invoke (server.clj:19)
    nrepl.server$handle$fn__1557.invoke (server.clj:39)
    clojure.core$binding_conveyor_fn$fn__5754.invoke (core.clj:2030)
    clojure.lang.AFn.call (AFn.java:18)
    java.util.concurrent.FutureTask.run (FutureTask.java:266)
    java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1149)
    java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:624)
    java.lang.Thread.run (Thread.java:748)

Clojure version

1.10.1

java version

openjdk version "1.8.0_282"
OpenJDK Runtime Environment (build 1.8.0_282-b08)
OpenJDK 64-Bit Server VM (build 25.282-b08, mixed mode)

vemv added a commit to reducecombine/orchard that referenced this issue Apr 11, 2021
vemv added a commit to reducecombine/orchard that referenced this issue Apr 11, 2021
vemv added a commit to reducecombine/orchard that referenced this issue Apr 11, 2021
vemv added a commit to reducecombine/orchard that referenced this issue Apr 13, 2021
vemv added a commit to reducecombine/orchard that referenced this issue Apr 13, 2021
vemv added a commit to reducecombine/orchard that referenced this issue Apr 13, 2021
bbatsov pushed a commit that referenced this issue Apr 13, 2021
@bbatsov
Copy link
Member

bbatsov commented Apr 13, 2021

See #114 - you can disable the dynapath stuff if you run into this.

vemv added a commit that referenced this issue Dec 13, 2021
vemv added a commit that referenced this issue Dec 13, 2021
bbatsov pushed a commit that referenced this issue Dec 14, 2021
@vemv
Copy link
Member

vemv commented Dec 22, 2021

Should be fixed in CIDER 1.2 (which was released today) / Orchard 0.8.0

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

Successfully merging a pull request may close this issue.

4 participants