Fork me on GitHub
#clojure-dev
<
2018-10-24
>
seancorfield22:10:07

Before I waste too much time digging in the wrong place, we have an app running on Clojure 1.10 Beta 4 and when we try to report an exception to the log file (with Timbre, which in turn uses Aviso "pretty"), we get this instead

#error {
 :cause "clojure.pprint.proxy$java.io.Writer$IDeref$PrettyFlush$4923d848 cannot be cast to clojure.pprint.PrettyFlush"
 :via
 [{:type java.lang.ClassCastException
   :message "clojure.pprint.proxy$java.io.Writer$IDeref$PrettyFlush$4923d848 cannot be cast to clojure.pprint.PrettyFlush"
   :at [clojure.pprint$write$fn__8503 invoke "pprint_base.clj" 233]}]
 :trace
 [[clojure.pprint$write$fn__8503 invoke "pprint_base.clj" 233]
  [clojure.pprint$write invokeStatic "pprint_base.clj" 233]
  [io.aviso.exception$format_property_value invokeStatic "exception.clj" 487]

seancorfield22:10:17

It seems to work just fine in the REPL -- but my debugging is hindered by part of the stacktrace being omitted (the key part: between my code and the actual, failing call into Timbre).

seancorfield22:10:46

Is any of the clojure.pprint.PrettyFlush stuff new in the 1.10 branch? (and thus might cause this)

hiredman22:10:41

looks like maybe a weird class loader error?

seancorfield22:10:00

Yeah, just not quite sure which path to start down...

alexmiller23:10:49

Nothing changed around here that I recall

alexmiller23:10:03

It almost looks like that’s an exception when printing in aviso

alexmiller23:10:21

Have you tried without it?

seancorfield23:10:14

I've tracked it down to only happening in the JAR version of the project -- when run from source, it all works.