Illegal reflective access warnings when running Netty with Java 9
See original GitHub issueExpected behavior
No warnings.
Actual behavior
Warnings when starting netty with java 9:
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/home/doom369/.m2/repository/io/netty/netty-common/4.1.16.Final/netty-common-4.1.16.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Please consider reporting this to the maintainers of io.netty.util.internal.ReflectionUtil
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
with --illegal-access=warn
enabled :
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/home/doom369/.m2/repository/io/netty/netty-common/4.1.16.Final/netty-common-4.1.16.Final.jar) to constructor java.nio.DirectByteBuffer(long,int)
WARNING: Illegal reflective access by io.netty.util.internal.ReflectionUtil (file:/home/doom369/.m2/repository/io/netty/netty-common/4.1.16.Final/netty-common-4.1.16.Final.jar) to method java.nio.Bits.unaligned()
Steps to reproduce
Run any netty server with Java 9.
Netty version
4.1.16.Final
JVM version (e.g. java -version
)
java version "9"
Java(TM) SE Runtime Environment (build 9+181)
Java HotSpot(TM) 64-Bit Server VM (build 9+181, mixed mode)
Maybe it would be better to do not access above classes in case of java 9 to avoid warning?
Issue Analytics
- State:
- Created 6 years ago
- Comments:20 (13 by maintainers)
Top Results From Across the Web
Java 9 Illegal Reflective Access Warning - Baeldung
Before Java 9, the Java Reflection API has a superpower: It could gain access to the non-public class members without limitation.
Read more >How to hide warning "Illegal reflective access" in java 9 ...
There are ways to disable illegal access warning, though I do not recommend doing this. 1. Simple approach. Since the warning is printed...
Read more >Java – How to hide warning “Illegal reflective access” in java 9 ...
javajava-9jvmnetty. I just tried to run my server with Java 9 and got next warning: WARNING: An illegal reflective access operation has occurred...
Read more >An illegal reflective access operation has occurred when ...
Java Agent: WARNING: An illegal reflective access operation has occurred WARNING: Illegal reflective access by org.forgerock.openam.sdk.com.
Read more >Java 9 Support - 2.0.0-rc-1 - Ratpack
3.26 Known Java 9 Errors/Warning messages. The following are messages emitted by Java 9+ that are expected. Guice illegal reflective access in issue...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Can we re-open this to actually solve the issue, I’d hate for things to break later on because this never got fixed?
The warning is quite clear this will break later on.
The error still occurs with netty 5.0.0.Alpha2. Please reopen the issue.