sialcasa / mvvmFX

an Application Framework for implementing the MVVM Pattern with JavaFX
Apache License 2.0
489 stars 104 forks source link

Illegal reflective access operation #575

Closed mipastgt closed 5 years ago

mipastgt commented 5 years ago

With all recent versions of MVVMFX I get an illegal reflective access operation warning. This is not only annoying but may also lead to problems in the future.

WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by net.jodah.typetools.TypeResolver (file:[...]/.m2/repository/net/jodah/typetools/0.4.1/typetools-0.4.1.jar) to method java.lang.Class.getConstantPool() WARNING: Please consider reporting this to the maintainers of net.jodah.typetools.TypeResolver 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

This could be easily fixed by upgrading to a more recent version of typetools. The current version is 0.6.0 and does not show this warning anymore.

manuel-mauky commented 5 years ago

Thanks for this hint. Upgrading to a newer version of typetools is a good idea.

manuel-mauky commented 5 years ago

In which situation do you get this warning? I try to reproduce it but I don't know how. Is this a runtime or compile time warning?

mipastgt commented 5 years ago

This is a runtime warning produced by the java runtime whenever some code violates the restrictions imposed by the new module system. My system is a Mac and I am using OpenJDK 11 from Oracle and the corresponding OpenJFX from Gluon (but this should not really matter). java.runtime.version: 11.0.2+9 javafx.version: 11.0.2 The warning disappears as soon as I force the use of a newer version of typetools (0.6.0). Such warnings are typical for older libraries which are not yet prepared for the (not so new anymore) Java module system.

manuel-mauky commented 5 years ago

I was now able to reproduce the warning. Previously I was only executing the apps via the IDE and there I wasn't getting the warnings. But when I executed the app via maven exec plugin I was seeing the exact same warning that you've mentionend.

It's now fixed with an update of typetools to 0.6.1