Originally reported on Google Code with ID 8253
Jul 10, 2013 10:14:00 AM java.util.prefs.WindowsPreferences <init>
WARNING: Could not open/create prefs root node SoftwareJavaSoftPrefs at root 0x80000002.
Windows RegCreateKeyEx(...) returned error code 5.
Compiling module app.app
[ERROR] Failure in unit cache map load.
java.util.concurrent.ExecutionException: java.lang.StackOverflowError
at java.util.concurrent.FutureTask$Sync.innerGet(Unknown Source)
at java.util.concurrent.FutureTask.get(Unknown Source)
at com.google.gwt.dev.javac.PersistentUnitCache.awaitUnitCacheMapLoad(PersistentUnitCache.java:466)
at com.google.gwt.dev.javac.PersistentUnitCache.find(PersistentUnitCache.java:391)
at com.google.gwt.dev.javac.CompilationStateBuilder.addArchive(CompilationStateBuilder.java:365)
at com.google.gwt.dev.ArchivePreloader.preloadArchives(ArchivePreloader.java:65)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:243)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:229)
at com.google.gwt.dev.Precompile.precompile(Precompile.java:141)
at com.google.gwt.dev.Compiler.run(Compiler.java:232)
at com.google.gwt.dev.Compiler.run(Compiler.java:198)
at com.google.gwt.dev.Compiler$1.run(Compiler.java:170)
at com.google.gwt.dev.CompileTaskRunner.doRun(CompileTaskRunner.java:88)
at com.google.gwt.dev.CompileTaskRunner.runWithAppropriateLogger(CompileTaskRunner.java:82)
at com.google.gwt.dev.Compiler.main(Compiler.java:177)
Caused by: java.lang.StackOverflowError
Reported by smithamohanan89
on 2013-07-10 04:49:34
I also have the registry error, although no subsequent exception is thrown in my case.
Reading on the Internet, I found out that this is due the fact that the GWT compiler
is trying to write in the Windows registry in HKEY_LOCAL_MACHINE, but it can't because
I haven't started it with Administrator privileges. Question is why I should need to.
Using GWT 2.4.0.
Reported by mauromol@tiscali.it
on 2013-10-15 12:59:09
I had the same issue: GWT compiler error with java.util.prefs.WindowsPreferences.
If I run as Administrator, it thankfully works. Why should I? Also, I don't even
get a stack trace.
Prefs can't be written to some <user.home>.gwt file?
Reported by zoran3
on 2013-10-18 20:39:28
I'm also having the same issue, no admin right resulting in an ERROR saying it's a WARNING.
This breaks integration with other tools that see this proclaimed error as an error
and logically consider that the compilation failed because of that.
Reported by nicolas.hurion
on 2014-03-27 08:56:12
The first WARNING refers to the registry permission problem.
The ERROR is a different issue, possibly caused by multiple running instances corrupting
the gwt-unitCache folder. I just have reproduced with same results (StackOverflowError).
Stopping all running GWT instances and removing the gwt-unitCache folder solved for
me.
Reported by forhecz.andras
on 2014-03-27 15:27:19
The first warning is caused by the update check (GWT stores in the preferences when
it last checked for updates so it only checks at most once per day), but it uses Preferences.userNodeForPackage()
(which uses HKEY_CURRENT_USER) so I can't see a) why it'd need to run as Administrator
or with UAC turned off and b) what could be changed in GWT to workaround the issue.
I'd rather punt and say it's a JDK bug.
If it really is a problem for you, then disable the update check with the -XdisableUpdateCheck
command-line argument.
The exception from the original report is an unrelated issue, as pointed out in comment
#4.
Reported by t.broyer
on 2014-03-28 10:07:16
- Status changed:
AsDesigned
dankurka is correct. This is indeed a JDK bug.
The problem is in the source for java/util/prefs/WindowsPreferences.java
from the JDK. Since both userNode
and systemNode
are declared static is means both of them will be created when the class is first loaded even if the systemNode
is never directly referenced. A fix seems to have been committed on 2016-0613 and 2016-06-15, so we will have to wait until this filters into Java 8 or Java 9.
As far as I can tell there’s no workaround that can be implemented in the GWT compiler as this is not an exception, it is actually a logged warning from the JDK’s internal logger.
Asked
11 years, 4 months ago
Viewed
6k times
I used RegCreateKeyEx from a win32 application(VisualStudio 2008) in 64 bit windows(Project built with target x64). It was able to create a registry entry. Now I have a dll file (Project built with target x64) which too wanna create registry entry but my dll is returning error code 5(Yeah! its a sign of access denied). My samDesired flag have KEY_ALL_Access + In linker->manifestfile->run as administrator chosen which still fails with error code 5. Whereas it works perfectly in 32bit windows(Project built with target x86). Am i missing something?
NOTE: I’m trying to create an entry at HKEY_LOCAL_MACHINE.
asked Oct 5, 2011 at 4:46
surendransurendran
4801 gold badge8 silver badges18 bronze badges
2
You can’t create a registry key in HKEY_LOCAL_MACHINE
because this isn’t a hive. You need to put your key in HKEY_LOCAL_MACHINESoftware
or (less probably) one of the other hives.
I don’t know why this appeared to work when you were running 32-bit code in WOW64, perhaps this is a side-effect of the way the 32-bit view of the registry is presented.
answered Oct 7, 2011 at 0:02
Harry JohnstonHarry Johnston
35k6 gold badges63 silver badges155 bronze badges
Problem
After running a clemb command under Windows 7 with Modeler 14.1 the following error is produced:
java.util.prefs.WindowsPreferences
WARNING: Could not open/create prefs root node SoftwareJavaSoftPrefs
at root 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
Cause
The error occurs because java.util.prefs.WindowsPreferences is trying to save information in HKEY_LOCAL_MACHINESoftwareJavaSoftPrefs instead of under HKEY_CURRENT_USERSoftwareJavaSoftPrefs.
Environment
Windows 7 64-bit
Resolving The Problem
The work around is to login as the administrator and create the key HKEY_LOCAL_MACHINESoftwareJavaSoftPrefs.
Related Information
[{«Product»:{«code»:»SS3RA7″,»label»:»IBM SPSS Modeler»},»Business Unit»:{«code»:»BU059″,»label»:»IBM Software w/o TPS»},»Component»:»Modeler»,»Platform»:[{«code»:»PF033″,»label»:»Windows»}],»Version»:»14.1.0″,»Edition»:»»,»Line of Business»:{«code»:»LOB10″,»label»:»Data and AI»}}]
- Remove From My Forums
-
Question
-
Here’s my code in C++, VS2008: Works in XP fails in Windows 7
DWORD dw;
HKEY hSectionKey = NULL;
RegOpenKeyEx(HKEY_LOCAL_MACHINE, «Software\MicrosoftWindowsCurrentVersion\Run», 0, KEY_WRITE|KEY_READ, &SectionKey);or
RegCreateKeyEx(HKEY_LOCAL_MACHINE, «Software\Microsoft\Windows\CurrentVersion\Run», 0,
REG_NONE, REG_OPTION_NON_VOLATILE, KEY_WRITE|KEY_READ, NULL, &hSectionKey,
&dw);
RegCloseKey(HKEY_LOCAL_MACHINE);Both RegOpenKeyEx and RegCreateKeyEx fail with error code 5 (ERROR_ACCESS_DENIED). If I change HKEY_LOCAL_MACHINE to HKEY_CURRENT_USER it works fine.
[I’m not making both RegOpenKeyEx and RegCreateKeyEx calls, I just put both of them in to let you know it fails]
What’s the solution in C++?
I am logged in a administrator.
Answers
-
-
Proposed as answer by
Tuesday, July 6, 2010 1:13 AM
-
Marked as answer by
Michael Sun [MSFT]Microsoft employee
Friday, July 9, 2010 7:23 AM
-
Proposed as answer by
-
CppUac is a nice app, but ultimately useless, because it requiresthe app to relaunch itself.
A superior method, suggested to me from another forum, is to modify the manifest file from Properties/Configuration Properties/Linker/Manifest File and Disable UAC and set
UAC Execution level to rquireAdministrator.THAT IS THE SOLUTION I need.
-
Marked as answer by
Michael Sun [MSFT]Microsoft employee
Friday, July 9, 2010 7:23 AM
-
Marked as answer by
I was getting the following error message when I would run a Java application on my new Windows 10 Pro PC:
Nov 21, 2019 3:57:37 PM java.util.prefs.WindowsPreferences <init> WARNING: Could not open/create prefs root node SoftwareJavaSoftPrefs at root 0x80000002. Windows RegCreateKeyEx(...) returned error code 5.
I searched the internet regarding the error message, people say it is a known bug and you need to manually create the following Windows registry key:
HKEY_LOCAL_MACHINESOFTWAREJavaSoftPrefs
When I opened the RegEdit, I found that the key already exists.
After a little more searching on the internet, I came across another comment that says you also need the following Windows registry key:
HKEY_LOCAL_MACHINESoftwareWOW6432NodeJavaSoftPrefs
So, I opened the RegEdit and found the key did not exist. I created it and then the error message went away.
Hence, for future users who encounter this error message, create a text file called javasoft_prefs.reg and put the following in it:
Windows Registry Editor Version 5.00 [HKEY_LOCAL_MACHINESOFTWAREJavaSoftPrefs] [HKEY_LOCAL_MACHINESoftwareWOW6432NodeJavaSoftPrefs]
Now start RegEdit and click File – > Import and select the javasoft_prefs.reg file and the error message will go away.
Or you can run RegEdit from the Command Line and pass the file name as a parameter:
regedit javasoft_prefs.reg
Regards,
Roger Lacroix
Capitalware Inc.
This entry was posted in Java, Programming, Windows.
Feys123 |
|
Статус: Новичок Группы: Участники Сказал(а) «Спасибо»: 4 раз |
Добрый день Подскажите, если кто сталкивался с подобной трудностью, как это обойти и открыть в конце концов её |
|
|
cross |
|
Статус: Сотрудник Группы: Администраторы, Участники Сказал(а) «Спасибо»: 3 раз |
Можете показать какая версия 7 явы у вас? |
Техническую поддержку оказываем тут. |
|
|
|
1 пользователь поблагодарил Анатолий Беляев за этот пост. |
Feys123
оставлено 24.10.2013(UTC) |
Feys123 |
|
Статус: Новичок Группы: Участники Сказал(а) «Спасибо»: 4 раз |
Java 7 Update 9 (64-bit) |
|
|
cross |
|
Статус: Сотрудник Группы: Администраторы, Участники Сказал(а) «Спасибо»: 3 раз |
А вы точно в эту jre ставили JCP? Можете выложить лог установки и потом попытку запуска? |
Техническую поддержку оказываем тут. |
|
|
|
1 пользователь поблагодарил Анатолий Беляев за этот пост. |
Feys123
оставлено 24.10.2013(UTC) |
Feys123 |
|
Статус: Новичок Группы: Участники Сказал(а) «Спасибо»: 4 раз |
Microsoft Windows [Version 6.2.9200] C:UsersОксана>cd C:JСPjcp.1.0.52lib C:JСPjcp.1.0.52lib>install.bat «C:Program FilesJavajre7» ╬°шсър юсЁр∙хэш ъ preferences: java.util.prefs.BackingStoreException: flush(): ╬°шсър юсЁр∙хэш ъ preferences: java.util.prefs.BackingStoreException: flush(): C:JСPjcp.1.0.52lib>ControlPane.bat «C:Program FilesJavajre7» C:JСPjcp.1.0.52lib> |
|
|
cross |
|
Статус: Сотрудник Группы: Администраторы, Участники Сказал(а) «Спасибо»: 3 раз |
Хотя скрипт и вернул SUCCEEDED сам JCP не установился у вас.(эта ошибка поправленна в более поздних версиях) У пользователя от которого вы делаете установку не хватает прав. Установку следует делать от адмнинистратора. |
Техническую поддержку оказываем тут. |
|
|
|
1 пользователь поблагодарил Анатолий Беляев за этот пост. |
Feys123
оставлено 24.10.2013(UTC) |
Feys123 |
|
Статус: Новичок Группы: Участники Сказал(а) «Спасибо»: 4 раз |
Благодарю за помощь, именно в этом и была проблема! |
|
|
Пользователи, просматривающие эту тему |
Guest |
Быстрый переход
Вы не можете создавать новые темы в этом форуме.
Вы не можете отвечать в этом форуме.
Вы не можете удалять Ваши сообщения в этом форуме.
Вы не можете редактировать Ваши сообщения в этом форуме.
Вы не можете создавать опросы в этом форуме.
Вы не можете голосовать в этом форуме.
In the Configure Distribution Wizard, the step «Configuring SQL Server Agent to start automatically» errors with the following text:
TITLE: Configure Distribution Wizard
——————————
An error occurred configuring SQL Server Agent.
——————————
ADDITIONAL INFORMATION:
RegCreateKeyEx() returned error 5, ‘Access is denied.’ (Microsoft SQL Server, Error: 22002)
This is a very minor error, and not difficult to work around at all. The wizard is attempting to change the SQL Server Agent service «Start Mode» to Automatic. You can do this via the SQL Server Configuration Manager instead.
In the Sysinternals Process Monitor, you may see: Operation: RegCreateKey Result: ACCESS DENIED Path: «HKLMSystemCurrentControlSetServicesSQLAgent$SQL2012»
If you encounter this error, select «No» in the «SQL Server Agent Start» page in the Configure Distribution Wizard (as shown below), and then set your agent service to Automatic Start Mode via the SQL Server Configuration Manager.
The third step of the wizard that failed before will not happen.
Why the failure actually occurs I did not figure this out, and I’m open to feedback, but this seems like a vestigial step to a wizard that otherwise has no negative impact. Running SSMS with «run as Administrator» does not appear to fix this error either. I’d love to know why this error happens in the first place.
July 27, 2016 by Sql Times
Quick one today:
Sometimes when we are setting up replication on our lab machines, we run into this error:
TITLE: Configure Distribution Wizard ------------------------------ An error occurred configuring SQL Server Agent. ------------------------------ ADDITIONAL INFORMATION: RegCreateKeyEx() returned error 5, 'Access is denied.' (Microsoft SQL Server, Error: 22002) For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&ProdVer=12.00.2000&EvtSrc=MSSQLServer&EvtID=22002&LinkId=20476 ------------------------------ BUTTONS: OK ------------------------------
Resolution:
This is easy to fix.
When you are going through the “Configure Distributor” wizard, do not select the option to “Yes, configure Sql Server Agent to start automatically“. Choose “No, I will start the Sql Server Agent manually” and go through the steps.
Once completed, go to Sql Server Configuration Manager and set the agent to start automatically.
The account under which these wizard runs does not have permissions to make registry changes. So just use the easier workaround.
Posted in DBA, Error Messages, High Availability, Replication, Sql Server 2008, Sql Server 2008 R2, Sql Server 2012, Sql Server 2014, Sql Server 2016, Technical Documentation, Tips and Techniques | Tagged Configure Distributor, Error Messages, Error: 22002, RegCreateKeyEx() returned error 5, ‘Access is denied.’, Replication, Sql Server, Tips and Techniques | 2 Comments