0

I recently updated to OpenJDK 11.0.9.1 2020-11-04, and I'm now getting this warning when using mvn clean.

This is the warning:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
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

I'm using Spring Boot 2.4.0, and my Maven version is :

Apache Maven 3.6.3
Maven home: /usr/share/maven
Java version: 11.0.9.1, vendor: Ubuntu, runtime: /usr/lib/jvm/java-11-openjdk-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-53-generic", arch: "amd64", family: "unix"

My OS version is Ubuntu 20.04.1 LTS x86_64.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
RdTek
  • 71
  • 1
  • 1
  • 8
  • The given output `/usr/share/maven/lib/guice.jar` shows a file which is not part of the official Apache Maven distribution cause there only exists a file `guice-4.2.1-no_aop.jar` which means it could be a wrong file or not the right version... Best is to download from https://maven.apache.org/download.cgi (.tar.gz) unpack; sha512 checksum afterwards compare the guice.jar from your system with the file in the distribution .... also check the output: `unzip -p guice-4.2.1-no_aop.jar META-INF/MANIFEST.MF`... – khmarbaise Nov 17 '20 at 17:29
  • sry the answer in that question is not very clear, does anyone have had this error using openJDK11 and spring boot? – RdTek Nov 17 '20 at 18:59
  • Have you checked the points I've mentioned? – khmarbaise Nov 17 '20 at 19:04

0 Answers0