fury icon indicating copy to clipboard operation
fury copied to clipboard

[Java] Displays warnings when starting my process with JDK25

Open CarsonJiang opened this issue 3 months ago • 7 comments

Feature Request

WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::arrayBaseOffset has been called by org.apache.fory.memory.Platform (file:/G:/.m2/repository/org/apache/fory/fory-core/0.12.2/fory-core-0.12.2.jar) WARNING: Please consider reporting this to the maintainers of class org.apache.fory.memory.Platform WARNING: sun.misc.Unsafe::arrayBaseOffset will be removed in a future release

Is your feature request related to a problem? Please describe

No response

Describe the solution you'd like

No response

Describe alternatives you've considered

No response

Additional context

No response

CarsonJiang avatar Sep 12 '25 03:09 CarsonJiang

Do you have any suggestions? I think we will keep using Unsafe until it's really be removed. But it would be great if we cab remove this warning message

chaokunyang avatar Sep 12 '25 04:09 chaokunyang

What about FFM API (Project Panama)? But it seems to change a lot of code, such as org.apache.fory.memory.Platform, ArraySerializers, etc…

Some Reference : https://github.com/open-telemetry/opentelemetry-java/issues/7219

CarsonJiang avatar Sep 12 '25 07:09 CarsonJiang

We can't use it, we need to support jdk8

chaokunyang avatar Sep 12 '25 07:09 chaokunyang

What a pity~

In the Flink large-scale data stream scenario, I think using "fory deserialize/serialize kafka msg" is a sexy attempt compared to json(Specifically, Project Panama's Zero-Copy Feature)

CarsonJiang avatar Sep 12 '25 08:09 CarsonJiang

@CarsonJiang It's just a warning message, it doesn't affect the usage. And if I remember right, flink also use Unsafe extensively.

chaokunyang avatar Sep 12 '25 08:09 chaokunyang

There are already many flinks systems using fory for serialization, you can take https://github.com/apache/fory/issues/1766#issuecomment-2951445896 as an example

chaokunyang avatar Sep 12 '25 09:09 chaokunyang

ok, thx a lot

CarsonJiang avatar Sep 12 '25 09:09 CarsonJiang