Project

General

Profile

Actions

Bug #20289

closed

Can't use rudder with openjdk17: cannot access class sun.net.util.IPAddressUtil

Added by François ARMAND almost 3 years ago. Updated almost 3 years ago.

Status:
Released
Priority:
N/A
Category:
System integration
Target version:
Severity:
UX impact:
User visibility:
Effort required:
Priority:
0
Name check:
To do
Fix check:
To do
Regression:

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.

Actions #1

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
Actions #2

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.

Ex lib: https://github.com/seancfoley/IPAddress

Actions #3

Updated by François ARMAND almost 3 years ago

(plus, can check for subnet belonging etc, so should have all what we need)

Actions #4

Updated by François ARMAND almost 3 years ago

  • Target version changed from 6.2.12 to 7.0.0~rc1
Actions #5

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.

Actions #6

Updated by François ARMAND almost 3 years ago

  • Status changed from New to In progress
  • Assignee set to François ARMAND
Actions #7

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
Actions #8

Updated by François ARMAND almost 3 years ago

  • Status changed from Pending technical review to Pending release
Actions #9

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.

Actions

Also available in: Atom PDF