Could not open windows registry node… Windows RegOpenKey(...) returned error code 2 message

When I run an OMM consumer application on Windows machine,
the application prints the messages below. Please advice.
Aug 15, 2017 2:00:06 PM java.util.prefs.WindowsPreferences
openKey
WARNING: Could not open windows registry node
Software\JavaSoft\Prefs\com\reuter
s\rfa\_/System at root 0x80000002. Windows RegOpenKey(...)
returned error code 2.
BackingStoreException during checkForLink for path:
/com/reuters/rfa/_System
Aug 15, 2017 2:00:06 PM java.util.prefs.WindowsPreferences
WindowsRegOpenKey1
WARNING: Trying to recreate Windows registry node Software\JavaSoft\Prefs\com\re
uters\rfa\_/System\/Event/Queue at root 0x80000002.
Aug 15, 2017 2:00:06 PM java.util.prefs.WindowsPreferences
openKey
WARNING: Could not open windows registry node
Software\JavaSoft\Prefs\com\reuter
s\rfa\_/System\/Event/Queue at root 0x80000002. Windows
RegOpenKey(...) returned
error code 2.
BackingStoreException during checkForLink for path:
/com/reuters/rfa/_System/Eve
ntQueue
…
Best Answer
-
According to the given warning/error messages,RFA Java fails to read some nodes in the
registry while RFA is trying to load the configuration from the registry. It is
possible that Windows OS does not allow the application to access the nodes
in the registry because the user running the application does not have the permission.I suggest you use one of the following ways to protect/fix the
problem:A. Login as Administrator which is allowed to access all
nodes in the registry then run the application by Administrator.or
B. Create RFA Java configuration under the User node which the user running the application can access.
The client can initialize RFA Java configuration from the file as the steps
below:1) Login as the user running
the application2) Set serverList and portNumber parameter of consConnection node in <RFAJ package>\QuickStart\quickstart.xml to be host and port of the server. For example: to connect to
the server name adsserver at port 14002, the configuration is:<node name="consConnection">
<map>
< entry key="connectionType" value="RSSL"/>
< entry key="serverList" value="adsserver"/>
< entry key="portNumber" value="14002"/>
</map>
</node>3) Save the file.
4) Import the file to the
registry. Open cmd and go to <RFAJ package>\Tools\. Then, type the following
command:java -jar config_loader.jar -file ..\QuickStart\quickstart.xml
5)The client can see the
configuration is under the User node by running config_editor.bat in <RFAJ package>\Tools\ as the example shown below:Note:
- config_editor.bat can be used to modify the
RFA configuration as well.- the client
needs to run the application to read the session named myNamespace::consSessionor
C. Modify the application to read RFA Java configuration
from ConfigDb setting in the application.
Hence, the application does not read RFA Java configuration from the registry;
there is no error from accessing registry failure. By using this way, the
client does not have to setup RFA Java configuration in the registry on every
machine where he would like to run the application. Please see the example
source code below:import com.reuters.rfa.config.ConfigDb;
…
void initializeConfigDb(ConfigDb configDb)
{
configDb.addVariable("myNamespace.Sessions.consSession.connectionList","consConnection");
configDb.addVariable("myNamespace.Connections.consConnection.connectionType","RSSL");
configDb.addVariable("myNamespace.Connections.consConnection.serverList","adsserver");
configDb.addVariable("myNamespace.Connections.consConnection.portNumber","14002");
}
…
public void init()
{
…
//Context.initialize();
ConfigDb configDb = new ConfigDb();
initializeConfigDb(configDb);
Context.initialize(configDb);
// Create a Session
String sessionName = CommandLine.variable("session");
//_session = Session.acquire(sessionName);
_session = Session.acquire("myNamespace::consSession");
…
}0
Answers
-
Complementing Pimchaya.Wongrukun's answer:
Beware, if you take the suggested solution B, i.e. you stick to only using the User tree and not put anything in the the System tree, you may still get this message printed on stderr:
Could not open/create prefs root node Software\JavaSoft\Prefs at root
0x80000002. Windows RegCreateKeyEx(...) returned error code 5.This is because of this bug in Oracle Java. It has been fixed, but only in Java 9. The good news is that if you are confident you don't have anything in System tree then you can ignore the above message. More information here.
(Bonus info: If you are not getting the above error message then it is sheer luck, AFAIU. It is then because you are on a machine that at some point has had a Java installed prior to v1.7.21 of Java runtime)
0
Categories
- All Categories
- 3 Polls
- 6 AHS
- 36 Alpha
- 166 App Studio
- 6 Block Chain
- 4 Bot Platform
- 18 Connected Risk APIs
- 47 Data Fusion
- 34 Data Model Discovery
- 684 Datastream
- 1.4K DSS
- 614 Eikon COM
- 5.2K Eikon Data APIs
- 10 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- 3 Trading API
- 2.9K Elektron
- 1.4K EMA
- 248 ETA
- 552 WebSocket API
- 37 FX Venues
- 14 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 23 Messenger Bot
- 3 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 60 Open Calais
- 275 Open PermID
- 44 Entity Search
- 2 Org ID
- 1 PAM
- PAM - Logging
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 22 RDMS
- 1.9K Refinitiv Data Platform
- 639 Refinitiv Data Platform Libraries
- 4 LSEG Due Diligence
- LSEG Due Diligence Portal API
- 4 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.2K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 12 World-Check Customer Risk Screener
- 1K World-Check One
- 46 World-Check One Zero Footprint
- 45 Side by Side Integration API
- 2 Test Space
- 3 Thomson One Smart
- 10 TR Knowledge Graph
- 151 Transactions
- 143 REDI API
- 1.8K TREP APIs
- 4 CAT
- 26 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 191 TREP Infrastructure
- 228 TRKD
- 915 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 91 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛