Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-4438983

Unexpected warning when trying to lock the file (linux)

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Not an Issue
    • Icon: P2 P2
    • None
    • 1.4.0
    • core-libs



      Name: iaR10016 Date: 04/10/2001



      JDK : JDK1.4.0beta-b59
      Platform[s] : Redhat Linux 6.2
      switch/Mode : -client -Xmixed

      The following test example demostrates the bug:

      -------------- test.java ----------------------
      import javax.swing.*;

      public class test {
       public static void main(String[] args) {
           JFileChooser fc = new JFileChooser();
           fc.showOpenDialog(new JFrame());
        }
      }
      -----------------------------------------------

      To reproduce just compile and run this example, then wait some time.
      The following warnings appear in the standard error stream:

      ...
      Apr 11, 2001 11:08:07 AM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
      WARNING: Could not lock System prefs.Unix error code 37.
      Apr 11, 2001 11:08:07 AM java.util.prefs.FileSystemPreferences syncWorld
      WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
      Apr 11, 2001 11:08:37 AM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
      WARNING: Could not lock System prefs.Unix error code 37.
      Apr 11, 2001 11:08:37 AM java.util.prefs.FileSystemPreferences syncWorld
      WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
      Apr 11, 2001 11:09:07 AM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
      WARNING: Could not lock System prefs.Unix error code 37.
      Apr 11, 2001 11:09:07 AM java.util.prefs.FileSystemPreferences syncWorld
      WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
      Apr 11, 2001 11:09:37 AM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
      WARNING: Could not lock System prefs.Unix error code 37.
      Apr 11, 2001 11:09:37 AM java.util.prefs.FileSystemPreferences syncWorld
      WARNING: Couldn't flush system prefs: java.util.prefs.BackingStoreException: Couldn't get file lock.
      Apr 11, 2001 11:10:07 AM java.util.prefs.FileSystemPreferences checkLockFile0ErrorCode
      WARNING: Could not lock System prefs.Unix error code 37.
      ...

      The bug is not reproducible if user can read and write in the directory /etc/.java/systemPrefs
      or this directory does not exist and user has permissions to create it.

      Please, note that the bug is always reproducible if the user can read and write in the directory <java.home>/.systemPrefs.

      ======================================================================

            kkladkosunw Konstantin Kladko (Inactive)
            irasunw Ira Ira (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: