WARNING: An illegal reflective access operation has occurred

1,823 views
Skip to first unread message

Ellen S.

unread,
Dec 9, 2017, 11:03:26 AM12/9/17
to XStream User
I wanted to pass this warning message on (as it suggests doing so). I am getting the message while building the code which was generated by using the following command with maven 3.5.2:

mvn archetype:generate -DarchetypeGroupId=net.ltgt.gwt.archetypes -DarchetypeVersion=LATEST -DarchetypeArtifactId=modular-webapp

The JDK is java 9.0.1, but the source & target are set to java 8 in the build.

[INFO] --- maven-war-plugin:2.2:war (default-war) @ gwt.java8-server ---
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.thoughtworks.xstream.core.util.Fields (file:/C:/Users/estrnod/.m2/repository/com/thoughtworks/xstream/xstream/1.3.1/xs
tream-1.3.1.jar) to field java.util.Properties.defaults
WARNING: Please consider reporting this to the maintainers of com.thoughtworks.xstream.core.util.Fields
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

Jörg Schaible

unread,
Dec 9, 2017, 7:45:37 PM12/9/17
to xstrea...@googlegroups.com

Hi Ellen,
Well, it's a message of the Java 9 runtime, it does not matter for wich target you've compiled the code.

Also this message is caused by the Maven build, not by your application. Neveertheless, XStream 1.3.1 is 9
years old, the Maven war plugin 2.2 is 5 years old. Since the version of the Maven plugins are normally
defined by the project (and not by your recent Maven version), you should write to the people who created
this archetype to use recent software.

Cheers,
Jörg

Reply all
Reply to author
Forward
0 new messages