This is indeed related to CLJ-2066 - the issue is the object that
data.xml is trying to reflect on is a SaxParserImpl, which comes from
a non-exported module in Java 9. The object implements SaxParser, and
parse() is a public method there, but Reflector is calling getClass()
on the object and trying to reflect on the result instead of on the
SaxParser parent class. The module system doesn't like any reflective
access on classes from non-exported packages, so complains. CLJ-2066
provides a patch that modifies Reflector to walk the ancestor tree
looking for something it can legally reflect on. However, that patch
was made when Java 9 early access builds would throw instead warn when
you made this type of access - now that it warns, the Reflector has no
way to know that it should walk the ancestor tree instead (without
adding Java 9 specific code, breaking Clojure on java < 9 unless
Clojure moves to a multi-release jar) since there is no exception, so
the only way to avoid this warning is to have wherever is calling
.parse() on the SaxParser type-hint. I looked through the data.xml
code, and it wasn't obvious to me where that is happening (that's one
frustrating thing about the reflection warning - it doesn't give a
stack, so tracking down where it is actually happening can be
difficult).

- Toby


On Fri, Nov 3, 2017 at 5:02 PM, Alan Thompson <clooj...@gmail.com> wrote:
> Just upgraded from 0.0.8 to
>
>
> [org.clojure/data.x
> ml "0.2.0-alpha3"]
>
>
>  and am still getting the same error.  The offending statement is
>
> (clojure.data.xml/parse  <buffered input stream>  )
>
>
> where the BIS is the result of
>
> (clojure.java.io/input-stream
>   (clojure.java.io/resource <html file>))
>
> Alan
>
>
> On Fri, Nov 3, 2017 at 1:36 PM, Alan Thompson <clooj...@gmail.com> wrote:
>>
>> OK, I upgraded lein to 2.8.1, and it removed one of the error messages.
>> I still have one remaining:
>>
>> WARNING: An illegal reflective access operation has occurred
>> WARNING: Illegal reflective access by clojure.lang.Reflector
>> (file:/home/alan/.m2/repository/org/clojure/clojure/1.9.0-beta4/clojure-1.9.0-beta4.jar)
>> to method
>> com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(org.xml.sax.InputSource,org.xml.sax.helpers.DefaultHandler)
>> WARNING: Please consider reporting this to the maintainers of
>> clojure.lang.Reflector
>> WARNING: Use --illegal-access=warn to enable warnings of further illegal
>> reflective access operations
>> WARNING: All illegal access operations will be denied in a future release
>>
>>
>> It seems to claim that  clojure.lang.Reflector  is a problem....   Trying
>> to narrow it down.
>> Alan
>>
>>
>> On Thu, Nov 2, 2017 at 1:11 PM, Peter Hull <peterhul...@gmail.com> wrote:
>>>
>>> On Thursday, 2 November 2017 19:46:35 UTC, Alex Miller wrote:
>>>>
>>>> I think this is an issue with Leiningen with Java 1.9 (re things in
>>>> dynapath and the changes in classloader details in Java 1.9), and not
>>>> Clojure itself.
>>>>
>>> Yes this was leiningen issue #2331 now fixed:
>>> https://github.com/technomancy/leiningen/issues/2331
>>>
>>> --
>>> You received this message because you are subscribed to the Google
>>> Groups "Clojure" group.
>>> To post to this group, send email to clojure@googlegroups.com
>>> Note that posts from new members are moderated - please be patient with
>>> your first post.
>>> To unsubscribe from this group, send email to
>>> clojure+unsubscr...@googlegroups.com
>>> For more options, visit this group at
>>> http://groups.google.com/group/clojure?hl=en
>>> ---
>>> You received this message because you are subscribed to the Google Groups
>>> "Clojure" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an
>>> email to clojure+unsubscr...@googlegroups.com.
>>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>
> --
> You received this message because you are subscribed to the Google
> Groups "Clojure" group.
> To post to this group, send email to clojure@googlegroups.com
> Note that posts from new members are moderated - please be patient with your
> first post.
> To unsubscribe from this group, send email to
> clojure+unsubscr...@googlegroups.com
> For more options, visit this group at
> http://groups.google.com/group/clojure?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Clojure" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to clojure+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clojure@googlegroups.com
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
clojure+unsubscr...@googlegroups.com
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to