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

WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Cannot Reproduce
    • Icon: P3 P3
    • None
    • 8
    • core-libs
    • x86_64
    • windows_7

      FULL PRODUCT VERSION :
      java version "1.8.0"
      Java(TM) SE Runtime Environment (build 1.8.0-b132)
      Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)



      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]

      A DESCRIPTION OF THE PROBLEM :
      The warning:
        Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
      is logged. This happens when accessing the userRoot. The static system root is also created at that time and causes the warning log.
      See:
        WindowsPreferrencesFactory

      This happens at least for fresh jre installations of jre 1.7.0_21 and higher. Installation of older jre versions create the key
        HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs
      versions 1.7.21 and later do NOT.
      When upgrading from an older version, the existing HKLM key is not removed. That is why it only occurs on fresh installations.
      With an existing HKLM key (from the installer) no warnings are generated.


      REGRESSION. Last worked in version 7u13

      ADDITIONAL REGRESSION INFORMATION:
      JRE 1.8.0 installer does NOT create the HKLM Prefs key
      JRE 1.7.0_21 (and higher) installer does NOT create the HKLM Prefs key
      JRE 1.7.0_13 installer does create the HKLM Prefs key
      _15 and _17 not tested.



      ERROR MESSAGES/STACK TRACES THAT OCCUR :
      Mar 25, 2014 11:19:08 AM java.util.prefs.WindowsPreferences <init>
      WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.


      REPRODUCIBILITY :
      This bug can be reproduced always.

      ---------- BEGIN SOURCE ----------
      package Bugs;

      import java.util.prefs.Preferences;

      public class PrefsWarning {

        void findPrefs() {
          Preferences prefs = Preferences.userRoot();
      // Preferences prefs = Preferences.userNodeForPackage(this.getClass());
        }

        public static void main(String[] args) {
          PrefsWarning pw = new PrefsWarning();
          pw.findPrefs();
        }

      }

      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      Crreate Prefs key manually
      - or -
      Install (very) old jre and upgrade it to a newer one


            Unassigned Unassigned
            webbuggrp Webbug Group
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: