Windows regcreatekeyex returned error code 5

Originally reported on Google Code with ID 8253 Jul 10, 2013 10:14:00 AM java.util.prefs.WindowsPreferences WARNING: Could not open/create prefs root node SoftwareJavaSoftPrefs at ro...

@dankurka

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

@dankurka

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

@dankurka

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

@dankurka

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

@dankurka

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

@dankurka

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

@phansson

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.

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
  • 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


Offline

Feys123

 


#1
Оставлено
:

23 октября 2013 г. 11:40:08(UTC)

Feys123

Статус: Новичок

Группы: Участники

Зарегистрирован: 23.10.2013(UTC)
Сообщений: 4
Откуда: Москва

Сказал(а) «Спасибо»: 4 раз

Добрый день
Столкнулся со следующей трудностью:
После установки JCP пытаюсь открыть контрольную панель, но по непонятным мне причинам не это не удаётся, со следующей ошибкой:
C:JСPjcp.1.0.52lib>ControlPane.bat «C:Program FilesJavajre7»
—- Starting control pane
Error: Could not find or load main class ru.CryptoPro.JCP.ControlPane.MainContro
lPane
—- Starting control pane failed
—- Script ERROR

Подскажите, если кто сталкивался с подобной трудностью, как это обойти и открыть в конце концов её Brick wall


Вверх


Offline

cross

 


#2
Оставлено
:

23 октября 2013 г. 12:54:10(UTC)

Анатолий Беляев

Статус: Сотрудник

Группы: Администраторы, Участники
Зарегистрирован: 24.11.2009(UTC)
Сообщений: 965
Откуда: Crypto-Pro

Сказал(а) «Спасибо»: 3 раз
Поблагодарили: 173 раз в 152 постах

Можете показать какая версия 7 явы у вас?

Техническую поддержку оказываем тут.
Наша база знаний.
Наша страничка в Instagram.


Вверх

thanks 1 пользователь поблагодарил Анатолий Беляев за этот пост.

Feys123

оставлено 24.10.2013(UTC)


Offline

Feys123

 


#3
Оставлено
:

23 октября 2013 г. 13:10:39(UTC)

Feys123

Статус: Новичок

Группы: Участники

Зарегистрирован: 23.10.2013(UTC)
Сообщений: 4
Откуда: Москва

Сказал(а) «Спасибо»: 4 раз

Java 7 Update 9 (64-bit)
У коллег с аналогичным софтом работает без проблем на 8-ке (Windows)


Вверх


Offline

cross

 


#4
Оставлено
:

23 октября 2013 г. 14:25:49(UTC)

Анатолий Беляев

Статус: Сотрудник

Группы: Администраторы, Участники
Зарегистрирован: 24.11.2009(UTC)
Сообщений: 965
Откуда: Crypto-Pro

Сказал(а) «Спасибо»: 3 раз
Поблагодарили: 173 раз в 152 постах

А вы точно в эту jre ставили JCP? Можете выложить лог установки и потом попытку запуска?

Техническую поддержку оказываем тут.
Наша база знаний.
Наша страничка в Instagram.


Вверх

thanks 1 пользователь поблагодарил Анатолий Беляев за этот пост.

Feys123

оставлено 24.10.2013(UTC)


Offline

Feys123

 


#5
Оставлено
:

23 октября 2013 г. 14:52:24(UTC)

Feys123

Статус: Новичок

Группы: Участники

Зарегистрирован: 23.10.2013(UTC)
Сообщений: 4
Откуда: Москва

Сказал(а) «Спасибо»: 4 раз

Microsoft Windows [Version 6.2.9200]
(c) Корпорация Майкрософт, 2012. Все права защищены.

C:UsersОксана>cd C:JСPjcp.1.0.52lib

C:JСPjcp.1.0.52lib>install.bat «C:Program FilesJavajre7»
Params: «C:Program FilesJavajre7»
java version «1.7.0_09»
Java(TM) SE Runtime Environment (build 1.7.0_09-b05)
Java HotSpot(TM) 64-Bit Server VM (build 23.5-b02, mixed mode)
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not create windows registry node SoftwareJavaSoftPrefsru at ro
ot 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru at
root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru at root
0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro/J/C/P at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro/J/C/P at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro/J/C/P at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro/J/C/P at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro/J/C/Pparams at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro/J/C/Pparams at root 0x80000002. Windows RegOpenKey(…) returned error co
de 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro/J/C/Ptools at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro/J/C/Ptools at root 0x80000002. Windows RegOpenKey(…) returned error cod
e 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:55 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
╧ЁютхЁър ышЎхэчшш:
╥шя: ╤хЁтхЁэр , яюфяшё№ ш °шЇЁютрэшх
─юяєёЄшьюх ўшёыю  фхЁ: 4
┬Ёхь  фхщёЄтш : ─ю 21.01.2014
─хщёЄтшЄхы№эр  ышЎхэчш .
—- Uninstall started
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not create windows registry node SoftwareJavaSoftPrefsru at ro
ot 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru at
root 0x80000002.
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru at root
0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro/Install at root 0x80000002.
юъЄ 23, 2013 3:51:57 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro/Install at root 0x80000002. Windows RegOpenKey(…) returned error code 2.

╬°шсър юсЁр∙хэш  ъ preferences: java.util.prefs.BackingStoreException: flush():
Backing store not available.
—- Hard delete started
—- Hard delete started at 23.10.2013 15:51:57,50
Не удается найти C:Program FilesJavajre7libextJCP.jar
Не удается найти C:Program FilesJavajre7libextJCP_ASN.jar
Не удается найти C:Program FilesJavajre7libextforms_rt.jar
Не удается найти C:Program FilesJavajre7libextasn1rt.jar
Не удается найти C:Program FilesJavajre7libextJCP.jar
Не удается найти C:Program FilesJavajre7libextJCP_ASN.jar
Не удается найти C:Program FilesJavajre7libextOscar.jar
Не удается найти C:Program FilesJavajre7libextJCryptoP.jar
Не удается найти C:Program FilesJavajre7libextJCPinst.jar
Не удается найти C:Program FilesJavajre7libextJCPxml.jar
Не удается найти C:Program FilesJavajre7libextJCPRequest.jar
Не удается найти C:Program FilesJavajre7libextJCP_CMS.jar
Не удается найти C:Program FilesJavajre7libextcpSSL.jar
Не удается найти C:Program FilesJavajre7libextUtil.jar
Не удается найти C:Program FilesJavajre7libextOCF.jar
Не удается найти C:Program FilesJavajre7libextJCPRevCheck.jar
Не удается найти C:Program FilesJavajre7libextJCPRevTools.jar
Не удается найти C:Program FilesJavajre7libextAsnLite.jar
—- Hard delete finished
—- Uninstall finished
—- Install started
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences <init>
WARNING: Could not create windows registry node SoftwareJavaSoftPrefsru at ro
ot 0x80000002. Windows RegCreateKeyEx(…) returned error code 5.
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru at
root 0x80000002.
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru at root
0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro at root 0x80000002.
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro at root 0x80000002. Windows RegOpenKey(…) returned error code 2.
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node SoftwareJavaSoftPrefsru/Cr
ypto/Pro/Install at root 0x80000002.
юъЄ 23, 2013 3:51:59 PM java.util.prefs.WindowsPreferences openKey
WARNING: Could not open windows registry node SoftwareJavaSoftPrefsru/Crypto
/Pro/Install at root 0x80000002. Windows RegOpenKey(…) returned error code 2.

╬°шсър юсЁр∙хэш  ъ preferences: java.util.prefs.BackingStoreException: flush():
Backing store not available.
—- Install finished
—- Script SUCCEEDED

C:JСPjcp.1.0.52lib>ControlPane.bat «C:Program FilesJavajre7»
—- Starting control pane
Error: Could not find or load main class ru.CryptoPro.JCP.ControlPane.MainContro
lPane
—- Starting control pane failed
—- Script ERROR

C:JСPjcp.1.0.52lib>


Вверх


Offline

cross

 


#6
Оставлено
:

24 октября 2013 г. 13:57:57(UTC)

Анатолий Беляев

Статус: Сотрудник

Группы: Администраторы, Участники
Зарегистрирован: 24.11.2009(UTC)
Сообщений: 965
Откуда: Crypto-Pro

Сказал(а) «Спасибо»: 3 раз
Поблагодарили: 173 раз в 152 постах

Хотя скрипт и вернул SUCCEEDED сам JCP не установился у вас.(эта ошибка поправленна в более поздних версиях) У пользователя от которого вы делаете установку не хватает прав. Установку следует делать от адмнинистратора.

Техническую поддержку оказываем тут.
Наша база знаний.
Наша страничка в Instagram.


Вверх

thanks 1 пользователь поблагодарил Анатолий Беляев за этот пост.

Feys123

оставлено 24.10.2013(UTC)


Offline

Feys123

 


#7
Оставлено
:

24 октября 2013 г. 14:30:57(UTC)

Feys123

Статус: Новичок

Группы: Участники

Зарегистрирован: 23.10.2013(UTC)
Сообщений: 4
Откуда: Москва

Сказал(а) «Спасибо»: 4 раз

Благодарю за помощь, именно в этом и была проблема!


Вверх

Пользователи, просматривающие эту тему

Guest

Быстрый переход
 

Вы не можете создавать новые темы в этом форуме.

Вы не можете отвечать в этом форуме.

Вы не можете удалять Ваши сообщения в этом форуме.

Вы не можете редактировать Ваши сообщения в этом форуме.

Вы не можете создавать опросы в этом форуме.

Вы не можете голосовать в этом форуме.

Понравилась статья? Поделить с друзьями:
  • Windows protection error you need to restart your computer
  • Windows project error unknown module s in qt script
  • Windows presentation foundation terminal server print w обнаружена ошибка
  • Windows powershell как изменить
  • Windows powershell выдает ошибку