Illegal reflective access in Java 9 or higher
- Dominant language
- Java
- Stars
- 2.4k
- Forks
- 940
- Avg merge
- 2d 12h
- Merged PRs (30d)
- 160
Description
Client: Arch Linux x64, MAGE 1.4.36V3 (installed from AUR)
Server: Ubuntu 18.04 ARM (kernel 4.15.0-1038-raspi2)
On a connection attempt, the following occurs in the server log:
`WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.jboss.serial.io.JBossObjectOutputStream (file:/home/patrick/xmage/mage-server/lib/jboss-serialization-4.2.2.GA.jar) to field java.io.ObjectOutputStream.enableReplace
WARNING: Please consider reporting this to the maintainers of org.jboss.serial.io.JBossObjectOutputStream
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 note that this occurs when running mage-server under java-1.11.0-openjdk-armhf. This warning does not appear when running under java-1.8.0-openjdk-armhf ([because this was made illegal in Java 9](https://www.logicbig.com/tutorials/core-java-tutorial/modules/illegal-access-operations.html)) and downgrading appears to work around the issue effectively - however this may not be a practicable solution for all.
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with mage-server/lib/jboss-serialization-4.2.2.GA.jar and the org.jboss.serial.io.JBossObjectOutputStream access reported in the Java 11 server log. Compare the connection behavior under Java 8 and Java 11; done means the illegal reflective access warning no longer appears on connection attempts without requiring a Java downgrade.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- java
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100