Details
-
Fix
-
Status: Released (View Workflow)
-
Minor
-
Resolution: Fixed
-
None
-
None
-
None
Description
Current Situation :
- When starting Jetty with Java 25, a warning related to the sun.misc.Unsafe::objectFieldOffset method is displayed during the Jetty startup process.
- JS7 2.8.4 :- During Jetty startup, the following warning is displayed:
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/appdata/sos-berlin.com/js7/joc/webapps/joc/WEB-INF/lib/scala3-library_3-3.7.4.jar) WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$ WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
- JS7 2.9.0 :- The same warning is observed during Jetty startup, although JS7 2.9.0 uses Scala 3.8.4:
WARNING: A terminally deprecated method in sun.misc.Unsafe has been called WARNING: sun.misc.Unsafe::objectFieldOffset has been called by scala.runtime.LazyVals$ (file:/appdata/sos-berlin.com/js7/joc/webapps/joc/WEB-INF/lib/scala3-library-3.8.4.jar) WARNING: Please consider reporting this to the maintainers of class scala.runtime.LazyVals$ WARNING: sun.misc.Unsafe::objectFieldOffset will be removed in a future release
Workaround :
- Add the JAVA option --sun-misc-unsafe-memory-access=allow to your jetty installation to suppress the warning.
Desired Behavior :
- Jetty should start without reporting the sun.misc.Unsafe::objectFieldOffset warning when using a supported Java version.