I am using version v1.19.0, which claims to <suppo...
# troubleshooting
t
I am using version v1.19.0, which claims to support JDK21 on the official website, but I encountered the following error:
java.lang.RuntimeException: java.lang.reflect.InaccessibleObjectException: Unable to make field private final java.lang.Object[] java.util.Arrays$ArrayList.a accessible: module java.base does not "opens java.util" to unnamed module @2a2843ec
at com.twitter.chill.java.ArraysAsListSerializer.<init>(ArraysAsListSerializer.java:69)
at org.apache.flink.api.java.typeutils.runtime.kryo.FlinkChillPackageRegistrar.registerSerializers(FlinkChillPackageRegistrar.java:67)
at org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer.getKryoInstance(KryoSerializer.java:502)
at org.apache.flink.api.java.typeutils.runtime.kryo.KryoSerializer.checkKryoInitialized(KryoSerializer.java:511)
s
As mentioned in release blog [1] jdk 21 support is still in beta If you think you face Apache Flink related issue then feel free to raise a jira issue with steps to reproduce [1] https://flink.apache.org/2024/03/18/announcing-the-release-of-apache-flink-1.19/#beta-support-for-java-21
t
In JDK 9 and later versions, reflection access has become more stringent, so this issue has been present since JDK 9.
I found this method to solve the problem:--add-opens java.base/java.util=ALL-UNNAMED
s
Yes we have a number add-opens and it could happen that some of them missed. However before adding this in Flink code we need a reproducing test showing the issue before the fix and then the fix showing that after that the test is passing... Btw are you able to reproduce the same problem for jdk11 and 17?
t
I can reproduce the problem in JDK 17 environment, This problem in
com.twitter:chill-java:jar:0.7.6:compile
.
Copy code
[INFO] |  +- org.apache.flink:flink-clients_2.12:jar:1.13.6:compile
[INFO] |  |  +- org.apache.flink:flink-runtime_2.12:jar:1.13.6:compile
[INFO] |  |  |  +- com.typesafe.akka:akka-actor_2.12:jar:2.5.21:compile
[INFO] |  |  |  |  +- com.typesafe:config:jar:1.3.3:compile
[INFO] |  |  |  |  \- org.scala-lang.modules:scala-java8-compat_2.12:jar:0.8.0:compile
[INFO] |  |  |  +- com.typesafe.akka:akka-stream_2.12:jar:2.5.21:compile
[INFO] |  |  |  |  +- org.reactivestreams:reactive-streams:jar:1.0.2:compile
[INFO] |  |  |  |  \- com.typesafe:ssl-config-core_2.12:jar:0.3.7:compile
[INFO] |  |  |  |     \- org.scala-lang.modules:scala-parser-combinators_2.12:jar:1.1.1:compile
[INFO] |  |  |  +- com.typesafe.akka:akka-protobuf_2.12:jar:2.5.21:compile
[INFO] |  |  |  +- com.typesafe.akka:akka-slf4j_2.12:jar:2.5.21:compile
[INFO] |  |  |  +- org.clapper:grizzled-slf4j_2.12:jar:1.3.2:compile
[INFO] |  |  |  +- com.github.scopt:scopt_2.12:jar:3.5.0:compile
[INFO] |  |  |  \- com.twitter:chill_2.12:jar:0.7.6:compile
[INFO] |  |  |     \- com.twitter:chill-java:jar:0.7.6:compile