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

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

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P4
    • Resolution: Duplicate
    • Affects Version/s: 7u60
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:
    • Subcomponent:
    • CPU:
      x86
    • OS:
      windows_7

      Description

      FULL PRODUCT VERSION :
      java version "1.7.0_60"
      Java(TM) SE Runtime Environment (build 1.7.0_60-b19)
      Java HotSpot(TM) Client VM (build 24.60-b09, mixed mode, sharing)


      ADDITIONAL OS VERSION INFORMATION :
      Microsoft Windows [Version 6.1.7601]


      A DESCRIPTION OF THE PROBLEM :
      Request to re-open JDK-8038489 there the solution was cannot reproduce.

      A standard user cannot create keys below HKEY_LOCAL_MACHINE which is tried when creating the attribute systemRoot of java.util.prefs.WindowsPreferences

      ADDITIONAL REGRESSION INFORMATION:
      See JDK-8038489 for a survey of JRE installers that are not affected.

      STEPS TO FOLLOW TO REPRODUCE THE PROBLEM :
      - on a fresh installation of Windows 7 install JRE 7u60
      - change to standard user, i.e. not member of Aministrators group
      - check both registry keys (HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Prefs and HKEY_CURRENT_USER\Software\JavaSoft\Prefs) they do not exist
      - run Bugs
      - check again HKEY_CURRENT_USER\Software\JavaSoft\Prefs has been created

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      no warning
      ACTUAL -
      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.

      5 means ERROR_ACCESS_DENIED

      REPRODUCIBILITY :
      This bug can be reproduced always.

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

      import java.util.prefs.Preferences;

      public class PrefsWarning {

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

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

      }
      ---------- END SOURCE ----------

      CUSTOMER SUBMITTED WORKAROUND :
      see JDK-8038489

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                coffeys Sean Coffey
                Reporter:
                webbuggrp Webbug Group
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: