fast-serialization icon indicating copy to clipboard operation
fast-serialization copied to clipboard

Not support JDK 17 LTS

Open TinyZzh opened this issue 2 years ago • 12 comments

image

TinyZzh avatar Aug 02 '22 02:08 TinyZzh

version: 3.0.3-jdk17

TinyZzh avatar Aug 02 '22 02:08 TinyZzh

image image

TinyZzh avatar Aug 02 '22 02:08 TinyZzh

one or more runtime commands like this one should work.. --add-opens=java.base/java.lang=ALL-UNNAMED

Strong Encapsulation in the JDK Java 17 LTS https://github.com/RuedigerMoeller/fast-serialization/issues/312#

istinnstudio avatar Aug 02 '22 07:08 istinnstudio

2022-09-23_12-54-44 Why doesn't it work on the simplest example? I use jdk 17 with --add-opens=java.base/java.lang=ALL-UNNAMED

MikhailPigolkin avatar Sep 23 '22 09:09 MikhailPigolkin

2022-09-23_12-54-44 Why doesn't it work on the simplest example? I use jdk 17 with --add-opens=java.base/java.lang=ALL-UNNAMED

everything works fine on 1.8....

MikhailPigolkin avatar Sep 23 '22 11:09 MikhailPigolkin

I also run in jdk17 with --add-opens=java.base/java.lang=ALL-UNNAMED, but it's also has the problem

durandal1981 avatar Oct 06 '22 12:10 durandal1981

This is the run commands I use, but those are related to my project

--add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.math=ALL-UNNAMED --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.util.concurrent=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.text=ALL-UNNAMED --add-opens=java.sql/java.sql=ALL-UNNAMED --add-opens=java.base/java.io=ALL-UNNAMED --add-opens=java.base/sun.nio=ALL-UNNAMED --add-opens=java.desktop/java.awt.geom=ALL-UNNAMED --add-opens=java.desktop/sun.awt.shell=ALL-UNNAMED --add-opens=java.desktop/java.awt=ALL-UNNAMED --add-exports=java.desktop/sun.awt.image=ALL-UNNAMED --add-opens=java.base/java.lang.reflect=ALL-UNNAMED

istinnstudio avatar Oct 07 '22 10:10 istinnstudio

We're using 3.0.3-jdk17. And it doesn't work without these JVM arguments (related for our requirements):

--add-opens=java.base/java.time=ALL-UNNAMED
--add-opens=java.base/java.lang=ALL-UNNAMED
--add-opens=java.base/java.math=ALL-UNNAMED
--add-opens=java.base/java.util=ALL-UNNAMED
--add-opens=java.base/java.util.concurrent=ALL-UNNAMED
--add-opens=java.base/java.net=ALL-UNNAMED
--add-opens=java.base/java.text=ALL-UNNAMED
--add-opens=java.sql/java.sql=ALL-UNNAMED

f0def avatar Oct 08 '22 11:10 f0def

I am not familiar with the internals of FST, but luckily I use with much of success the 2.57 version with the latest java-17 additions from 3.0.3-jdk17 branch. Some other selected pull requests added also, I do not know what bugs or side effects this might rise.

edit: Here is a link to sources: [2.57-jdk17-backport-experimental] (https://github.com/istinnstudio/fast-serialization-2.57-java17)

A fork to include those mods for those who might find it useful. I use 2.57 because 3.0 version breaks all my serialized files and for the time being I am too lazy to write a mass file converter (as suggested by author). Use it with extreme caution.

istinnstudio avatar Oct 08 '22 12:10 istinnstudio

I tried to make it as easy as possible to use FST with Java 17 using a small example project: https://github.com/ndrsf/fst-java17 But I didn't find a production-ready way to use FST without passing the JVM parameters.

ndrsf avatar Oct 19 '22 20:10 ndrsf

Any updates on this issue? Using version 3.0.4-jdk17 doesn't appear to help.

lmeinen avatar Jun 15 '23 14:06 lmeinen

I do not think there is an other way other than "--add-opens" and probably it will stay this way for ever

istinnstudio avatar Jun 15 '23 22:06 istinnstudio