Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Warnings with Java 9, Clojure 1.9.0, and lein 2.8.1 #91

Closed
neverfox opened this issue Jan 1, 2018 · 7 comments · Fixed by #117
Closed

Warnings with Java 9, Clojure 1.9.0, and lein 2.8.1 #91

neverfox opened this issue Jan 1, 2018 · 7 comments · Fixed by #117

Comments

@neverfox
Copy link

neverfox commented Jan 1, 2018

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.lang.Reflector (file:/usr/local/Cellar/leiningen/2.8.1/libexec/leiningen-2.8.1-standalone.jar) to method com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(java.io.Reader)
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
all artifacts are up-to-date.

I do not get this warning with other lein commands, e.g. lein repl.

@neverfox neverfox changed the title Warnings with Java 9 and Clojure 1.9.0 Warnings with Java 9, Clojure 1.9.0, and lein 2.8.1 Jan 1, 2018
@xsc
Copy link
Owner

xsc commented Jan 2, 2018

@neverfox Thanks for reporting! I think the root cause is clojure.data.xml calling that method (here), as well as Clojure's reflection behaviour.

A quick fix could be switching to a different XML parsing library but I'd rather see this resolved in Clojure itself. CLJ-2066 seems to be the relevant issue.

@lread
Copy link

lread commented Jan 6, 2019

Hi there, CLJ-2066 was resolved with Clojure 1.10 release. Any advice on how to quash these warnings under OpenJDK 11?

@souenzzo
Copy link

souenzzo commented Feb 4, 2019

Using Leiningen 2.8.3 on Java 11 Java HotSpot(TM) 64-Bit Server VM with

{:user {:dependencies [[org.clojure/clojure "1.10.0"]]
        :plugins      [[lein-ancient "0.6.15"]]}}

And still getting warnings.

@j-cr
Copy link

j-cr commented Dec 23, 2019

Slightly different warnings (lein-ancient 0.6.15, clojure 1.10.*):

> lein version
Leiningen 2.9.1 on Java 11.0.5 OpenJDK 64-Bit Server VM 
> lein ancient
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by clojure.lang.InjectedInvoker/0x0000000100062840 to method com.sun.xml.internal.stream.XMLInputFactoryImpl.createXMLStreamReader(java.io.InputStream)
WARNING: Please consider reporting this to the maintainers of clojure.lang.InjectedInvoker/0x0000000100062840
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
all artifacts are up-to-date.

@superstructor
Copy link
Contributor

This appears to be fixed by upgrading org.clojure/data.xml in ancient-clj/project.clj to 0.2.0-alpha6 (latest available). @xsc

@superstructor
Copy link
Contributor

@xsc I've opened a pull request with the change. If you could please merge and release w/ associated upgrade of the ancient-clj version in the plugin's project.clj it would help clean up terminals everywhere!

@lread
Copy link

lread commented Nov 19, 2020

@superstructor, antq is actively maintained and might be an interesting alternative for you to check out. I am happily using it for my tools deps projects.

@xsc xsc closed this as completed in #117 Dec 21, 2020
xsc pushed a commit that referenced this issue Dec 21, 2020
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants