Uploaded image for project: 'JOC - JS7 Operations Center'
  1. JOC - JS7 Operations Center
  2. JOC-2279

Jetty logs sun.misc.Unsafe Warning During Startup with Java 25

    XMLWordPrintable

Details

    • Fix
    • Status: Released (View Workflow)
    • Minor
    • Resolution: Fixed
    • None
    • 2.8.5, 2.9.1
    • 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.

      Attachments

        Activity

          People

            oh Oliver Haufe
            ritesh-telkar Ritesh Telkar
            Aakash Rao Aakash Rao
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: