-
Bug
-
Resolution: Cannot Reproduce
-
P3
-
None
-
8
-
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
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
- duplicates
-
JDK-8046020 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Closed
- relates to
-
JDK-8139507 WARNING: Could not open/create prefs root node Software\JavaSoft\Prefs
- Resolved