Open jhm-ciberman opened 5 years ago
Duplicate of #1133
JDK 10 is still a half baked jvm so I highly recommend moving across, in JDK 10 though with Guice 4.2 i didn't experience any of these. java.lang opening also wasn't required on JDK 10 but is on JDK 11
Very easy to fix... System.setProperty("com.google.inject.internal.cglib.$experimental_asm7", "true");
Then --add-opens java.base/java.lang=com.google.guice,javassist
I've released the fully modular guice artifacts based on 4.2.2 All extensions as well
0.70.0.1 is busy going to maven central
guice : https://search.maven.org/artifact/com.guicedee.services/guice/
guice extensions all available -
Current site https://guicedee.com/ - Done the pages up to persistence, should have it all done by the weekend.
Hi All, Getting this error in maven project with test target. Using JDK 13 (openJDK 13.0.1) Surefire plugin 3.0.0-M4 Maven version 3.3.9
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1
@alan-hwp are you using Ubuntu's custom distribution of Maven? The official Maven distribution uses the "no-AOP" build of Guice which doesn't contain any CGLIB code. If you download an official distribution from https://maven.apache.org/ then you shouldn't see the warning.
Greetings, Out team is getting this error when starting our guice-based applications:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/raw/lib/guice-4.2.2.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
So far, this hasn't caused any issues, but we are a bit concerned, given the rate at which OpenJDK updates are becoming more restrictive/secure.
We are running a docker image with the following: base image: Ubuntu 18.04 java version: OpenJDK_11.0.5.10 (AdoptOpenJDK) gradle version: 5.4.1 guice version: 4.2.2
Also present in Guice 4.2.3
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/home/xxxxx/.m2/repository/com/google/inject/guice/4.2.3/guice-4.2.3.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
Environment: Ubuntu 20.04.1 LTS openjdk version "11.0.7" 2020-04-14 OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.7+10) OpenJDK 64-Bit Server VM AdoptOpenJDK (build 11.0.7+10, mixed mode)
IntelliJ IDEA 2020.2 (Ultimate Edition) Build #IU-202.6397.94, built on July 27, 2020 Subscription is active until November 13, 2020 Runtime version: 11.0.7+10-b944.20 amd64 VM: OpenJDK 64-Bit Server VM by JetBrains s.r.o. Linux 5.4.0-42-generic GC: ParNew, ConcurrentMarkSweep Registry: compiler.automake.allow.when.app.running=true Non-Bundled Plugins: Key Promoter X, Axis TCP Monitor Plugin, com.intellij.kubernetes, aws.toolkit, org.intellij.scala, com.intellij.bigdatatools, com.jetbrains.edu, training Current Desktop: ubuntu:GNOME
Apache Maven 3.6.3 Maven home: /usr/share/maven Java version: 11.0.7, vendor: AdoptOpenJDK, runtime: /home/dever/.jabba/jdk/adopt@1.11.0-7 Default locale: en_US, platform encoding: UTF-8 OS name: "linux", version: "5.4.0-42-generic", arch: "amd64", family: "unix"
👋 Hi all, exactly the same problem for me...
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: fr_FR, platform encoding: UTF-8
OS name: "linux", version: "5.4.0-56-generic", arch: "amd64", family: "unix"
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
Hi @antoinedvd (and anyone else using Ubuntu's build of Maven) this only happens with Ubuntu's build of Maven because they re-bundle it with the AOP enabled Guice jar - the official Apache/Maven distribution ships with the no-AOP Guice jar which does not have this warning.
You can download the official Maven distribution from https://maven.apache.org/download.cgi
Hi @mcculls, you right. Thank you for your advice, it works !
This warning appears on my project when I compile it. I'm using Guice 4.2.1 (maven) and JDK 10 I checked the Travis builds and it seems that the warning appears on travis CI also:
https://travis-ci.org/google/guice/jobs/440573805#L1747
Is there any quickfix?