Bug #20289
closedCan't use rudder with openjdk17: cannot access class sun.net.util.IPAddressUtil
Description
It seems that the visibility of some util classes changed in open jdk17, and when we try to compile rudder with it, we get an error:
[2021-11-22T17:00:43.647Z] java.util.concurrent.ExecutionException: Boxed Exception [2021-11-22T17:00:43.647Z] Caused by: java.lang.IllegalAccessError: class com.normation.rudder.services.servers.AllowedNetwork$ (in unnamed module @0x6c50245e) cannot access class sun.net.util.IPAddressUtil (in module java.base) because module java.base does not export sun.net.util to unnamed module @0x6c50245e [2021-11-22T17:00:43.647Z] at com.normation.rudder.services.servers.AllowedNetwork$.isValid(PolicyServerData.scala:88)
I'm setting target = 6.2, but depending on the reach of the change, we may need to correct it only in 7.0. This does not seem like a showstopper since java 11 works well with rudder and is an LTS that should outlive rudder 6.2 support.
Updated by Alexis Mousset almost 3 years ago
- Subject changed from Can use rudder with openjdk17: cannot access class sun.net.util.IPAddressUtil to Can't use rudder with openjdk17: cannot access class sun.net.util.IPAddressUtil
Updated by François ARMAND almost 3 years ago
Best solution seems to use a dedicated IP address parsing lib, so that we are indep from the build. I propose to do it for 7.0 only.
Updated by François ARMAND almost 3 years ago
(plus, can check for subnet belonging etc, so should have all what we need)
Updated by François ARMAND almost 3 years ago
- Target version changed from 6.2.12 to 7.0.0~rc1
Updated by François ARMAND almost 3 years ago
Actually, it's useless to backport that to 6.2 since it's unlekilly people will use rudder 6.2 with JDK 17 since the JS engine wouldn't work.
Updated by François ARMAND almost 3 years ago
- Status changed from New to In progress
- Assignee set to François ARMAND
Updated by François ARMAND almost 3 years ago
- Status changed from In progress to Pending technical review
- Assignee changed from François ARMAND to Alexis Mousset
- Pull Request set to https://github.com/Normation/rudder/pull/4006
Updated by François ARMAND almost 3 years ago
- Status changed from Pending technical review to Pending release
Applied in changeset rudder|0d3d4deccede09f90b02c567de9c926118e9f6d6.
Updated by Vincent MEMBRÉ almost 3 years ago
- Status changed from Pending release to Released
This bug has been fixed in Rudder 7.0.0~rc1 which was released today.