This page is not created by, affiliated with, or supported by Slack Technologies, Inc.
2022-09-02
Channels
- # adventofcode (6)
- # announcements (6)
- # babashka (21)
- # babashka-sci-dev (18)
- # biff (6)
- # clara (4)
- # clj-commons (2)
- # clj-kondo (7)
- # cljdoc (4)
- # clojure (9)
- # clojure-berlin (8)
- # clojure-europe (23)
- # clojure-gamedev (3)
- # clojure-indonesia (1)
- # clojure-nl (1)
- # clojure-norway (10)
- # clojure-poland (1)
- # clojurescript (27)
- # community-development (1)
- # conjure (32)
- # etaoin (6)
- # events (20)
- # fulcro (5)
- # graalvm (1)
- # helix (19)
- # hyperfiddle (14)
- # introduce-yourself (2)
- # music (1)
- # nbb (24)
- # off-topic (37)
- # pathom (2)
- # polylith (14)
- # reagent (11)
- # releases (1)
- # remote-jobs (1)
- # reveal (22)
- # shadow-cljs (16)
- # sql (3)
- # squint (11)
- # test-check (2)
- # xtdb (36)
Did anyone notice a problem with Timbre when using JDK 17? I got a log with this stacktrace:
[33mtaoensso.timbre/[1;33mstacktrace[m [32m timbre.cljc: 944[m
[33mio.aviso.exception/[1;33mformat-exception[m [32m exception.clj: 641[m
[33mio.aviso.exception/[1;33mformat-exception[m [32m exception.clj: 643[m
[33mio.aviso.exception/[1;33mwrite-exception[m [32m exception.clj: 636[m
[33mio.aviso.exception/[1;33manalyze-exception[m [32m exception.clj: 453[m
[33mio.aviso.exception/[1;33mexpand-exception[m [32m exception.clj: 418[m
[33mio.aviso.exception/[1;33mmatch-keys[m [32m exception.clj: 101[m
[33mclojure.core/[1;33mreduce[m [32m core.clj: 6886[m
[33mclojure.core.protocols/fn/[1;33mG[m [32m protocols.clj: 13[m
[33mclojure.core.protocols/[1;33mfn[m [32m protocols.clj: 75[m
[33mclojure.core.protocols/[1;33mseq-reduce[m [32m protocols.clj: 24[m
[33mclojure.core/[1;33mseq[m [32m core.clj: 139[m
[37m...[m [32m [m
[33mclojure.core/bean/thisfn/[1;33mfn[m [32m core_proxy.clj: 427[m
[33mclojure.core/bean/[1;33mv[m [32m core_proxy.clj: 419[m
[33mclojure.core/bean/fn/[1;33mfn[m [32m core_proxy.clj: 413[m
[37m...[m [32m [m
[37mjdk.internal.reflect.Reflection.newIllegalAccessException[m [32m Reflection.java: 392[m
[1;31mjava.lang.IllegalAccessException[m: [3mclass clojure.core$bean$fn__7278$fn__7279 cannot access class sun.security.provider.certpath.SunCertPathBuilderException (in module java.base) because module java.base does not export sun.security.provider.certpath to unnamed module @26933859[m
It looks like it's trying to access sun.security.provider.certpath.SunCertPathBuilderException
which is no longer exposed in JDK 17 (or maybe some earlier JDK versions)?--add-exports=java.base/sun.security.provider.certpath=ALL-UNNAMED
something along those lines in jvm opts ? (or add-opens
even) (i don't think it's timbre related, it looks like it's aviso pretty not being able to "datafy" the exception)
But it's timbre using aviso, right? I'm wondering what information they are trying to get that makes it more useful than plain stacktrace..
clj꞉user꞉>
(StackTraceElement->vec (.getStackTrace (Thread/currentThread)))
; Execution error (ClassCastException) at user/eval9690 (REPL:138).
; class [Ljava.lang.StackTraceElement; cannot be cast to class java.lang.StackTraceElement ([Ljava.lang.StackTraceElement; and java.lang.StackTraceElement are in module java.base of loader 'bootstrap')
What is the difference between Ljava.lang.x
and java.lang.x
and can one be converted to the other?It's [Ljava.lang.x;
actually - the [
and ;
bits are still important.
https://stackoverflow.com/a/5085907/564509
And on how to convert - just map
over all of them, assuming you need all of them:
(map StackTraceElement->vec (.getStackTrace (Thread/currentThread)))