WARNING: An illegal reflective access operation has occurred

Hello Community!

I do get the illegal reflective access warning. My reports run correctly so far.
Have used the net.sf.jasperreports artifactId: jasperreports version: 6.15.0 with JDK 14.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.jasperreports.engine.util.ClassUtils (file:/C:/Users/Costis/.m2/repository/net/sf/jasperreports/jasperreports/6.15.0/jasperreports-6.15.0.jar) to constructor com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl()
WARNING: Please consider reporting this to the maintainers of net.sf.jasperreports.engine.util.ClassUtils
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

Is there a new jasperreports-6.15.0.jar that solves the problem?

Thank you
Costis Aivalis

costis4's picture
164
Joined: Feb 21 2011 - 12:02am
Last seen: 9 months 1 week ago

I am getting the same and attempted switching out the groovy jar to 3.06 but I'm still getting the same message

lbalding@gopivotsolutions.com - 1 year 9 months ago

Same here - if I compile with Java 8 its ok, Java 11 and I get this warning. I suppose we need someone which a support contract to report it so it gets addressed

davidgarratt - 1 year 6 months ago

Same here, with Netbeans 8 and jasperreports-6.2.0 no issues with this:

    JasperCompileManager.compileReportToFile("C:/test/jrxml/bht.jrxml", "C:/test/compiled/bht.jasper");

=>> But now with Apache Netbeans IDE 12.2, JDK15 and jasperreports-6.16.0 I get this warning also:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by net.sf.jasperreports.engine.util.ClassUtils (file:/C:/test/Jaspersoft/jasperreports-6.16.0.jar) to constructor com.sun.org.apache.xerces.internal.util.XMLGrammarPoolImpl()
WARNING: Please consider reporting this to the maintainers of net.sf.jasperreports.engine.util.ClassUtils
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
BUILD SUCCESSFUL (total time: 12 seconds)

I use the groovy file which is distributed with the used jasperreports-6.16.0 I library: groovy-all- 2.4.16.jar

info_984 - 1 year 5 months ago

1 Answer:

Just in case anybody else runs into the same problem: Substitute groovy-2.5.2.jar with groovy-3.0.6.jar. The warnings stop.

costis4's picture
164
Joined: Feb 21 2011 - 12:02am
Last seen: 9 months 1 week ago
Feedback