5

I am working on my automation project where I have implemented gradle with java 10 with selenium with cucumber in IntelliJ.

But when I run my project I get the below warning which I unable to resolve it. Any help would really be appreciated.

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by cucumber.deps.com.thoughtworks.xstream.core.util.Fields (file:/C:/Users/sobhit.s/.gradle/caches/modules-2/files-2.1/info.cukes/cucumber-jvm-deps/1.0.5/69ed0efe4b81f05da3c0bdc7281cbdc43f5ceb26/cucumber-jvm-deps-1.0.5.jar) to field java.util.TreeMap.comparator
WARNING: Please consider reporting this to the maintainers of cucumber.deps.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
Taslim Oseni
  • 6,086
  • 10
  • 44
  • 69
Sobhit Sharma
  • 697
  • 14
  • 45
  • 3
    XStream currently does not support Java 9. Degrade the Java version to 8 and the warning should disappear... https://github.com/x-stream/xstream/issues/103 – Grasshopper Aug 19 '18 at 20:05
  • 5
    Consider upgrading to Cucumber 3.x. It removes the dependency on XStream. https://cucumber.io/blog/2018/05/19/announcing-cucumber-jvm-3-0-0 – M.P. Korstanje Aug 20 '18 at 07:21
  • But I am using java 10. – Sobhit Sharma Aug 24 '18 at 06:48
  • Java 10 subsumes Java 9 changes. Try dropping back to Java 8 as Grasshopper suggested. E.g. "With Java 9 split packages are no longer allowed. However by design cucumber uses split packages to make the api recognizable by the end user." – MikeJRamsey56 Sep 04 '18 at 20:52
  • I will try and update you. Thanks for helping – Sobhit Sharma Sep 05 '18 at 17:29

0 Answers0