Open jdf-id-au opened 5 years ago
Coming back to this one because it was annoying me. I think yada is responsible for the reflection warning. I got around to enabling debug:
clj -J--illegal-access=debug -e "(compile 'project.namespace)"
and it pointed me at yada.charset
using clojure.xml/parse
, which is a known cause of the reflection problem.
WARNING: Illegal reflective access by clojure.lang.InjectedInvoker/0x0000000800b7d440 (file:/Users/jdf/.m2/repository/org/clojure/clojure/1.10.1/clojure-1.10.1.jar) to method com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(org.xml.sax.InputSource,org.xml.sax.helpers.DefaultHandler)
at clojure.lang.Reflector.canAccess(Reflector.java:49)
at clojure.lang.Reflector.toAccessibleSuperMethod(Reflector.java:84)
at clojure.lang.Reflector.lambda$invokeInstanceMethod$0(Reflector.java:99)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
at java.base/java.util.ArrayList$ArrayListSpliterator.forEachRemaining(ArrayList.java:1621)
at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:484)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
at java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(ReduceOps.java:913)
at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
at java.base/java.util.stream.ReferencePipeline.collect(ReferencePipeline.java:578)
at clojure.lang.Reflector.invokeInstanceMethod(Reflector.java:101)
at clojure.xml$startparse_sax.invokeStatic(xml.clj:76)
at clojure.xml$startparse_sax.invoke(xml.clj:75)
at clojure.xml$parse.invokeStatic(xml.clj:92)
at clojure.xml$parse.invoke(xml.clj:78)
at clojure.xml$parse.invokeStatic(xml.clj:86)
at clojure.xml$parse.invoke(xml.clj:78)
at yada.charset__init.load(Unknown Source)
at yada.charset__init.<clinit>(Unknown Source)
at java.base/java.lang.Class.forName0(Native Method)
at java.base/java.lang.Class.forName(Class.java:416)
at clojure.lang.RT.classForName(RT.java:2211)
at clojure.lang.RT.classForName(RT.java:2220)
at clojure.lang.RT.loadClassForName(RT.java:2239)
at clojure.lang.RT.load(RT.java:449)
at clojure.lang.RT.load(RT.java:424)
at clojure.core$load$fn__6839.invoke(core.clj:6126)
at clojure.core$load.invokeStatic(core.clj:6125)
at clojure.core$load.doInvoke(core.clj:6109)
at clojure.lang.RestFn.invoke(RestFn.java:408)
at clojure.core$load_one.invokeStatic(core.clj:5908)
at clojure.core$load_one.invoke(core.clj:5903)
Would it be possible to move to org.clojure/data.xml
like Alex Miller suggests?
I'll try to use https://github.com/juxt/yada/pull/122 as a guide to resolve what I'm getting with:
It managed to take out my whole repl until I traced it down! (At project startup, maybe via a timeout.)
EDIT ... oh dear can't find anything very quickly. Could it be in a sub-dependency? EDIT ... I was using only
taoensso.timbre
for logging; addingcom.fzakaria/slf4j-timbre
andorg.slf4j/slf4j-api
seems to have resolved the problem.