why dictionary retrieval failed
When debugging the code at night in China time, the following error was reported. Why?
Best Answer
-
I can replicate this issue when using ChannelType::RSSL_ENCRYPTED.
Exception in thread "main" java.lang.ClassCastException: com.refinitiv.ema.access.EncryptedChannelConfig cannot be cast to com.refinitiv.ema.access.SocketChannelConfig
at com.refinitiv.ema.access.OmmConsumerImpl.loadDictionary(OmmConsumerImpl.java:385)
at com.refinitiv.ema.access.OmmConsumerImpl.handleAdminDomains(OmmConsumerImpl.java:450)
at com.refinitiv.ema.access.OmmBaseImpl.initialize(OmmBaseImpl.java:285)
at com.refinitiv.ema.access.OmmConsumerImpl.<init>(OmmConsumerImpl.java:43)
at com.refinitiv.ema.access.EmaFactory.createOmmConsumer(EmaFactory.java:237)
at com.refinitiv.ema.examples.training.consumer.series100.ex100_MP_Streaming.Consumer.main(Consumer.java:57)It looks like to be a problem in the API. According to the class hierarchy, EncryptedChannelConfig can't be cast to SocketChannelConfig.
You can report this issue via GitHub.
For the workaround:
1. You can load the data dictionary from the local files instead.
<Dictionary>
<Name value="Dictionary_2"/>
<DictionaryType value="DictionaryType::FileDictionary"/>
<!-- dictionary names are optional: defaulted to RDMFieldDictionary and enumtype.def -->
<RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
<EnumTypeDefFileName value="./enumtype.def"/>
</Dictionary>2. Or, you can increase the value of DictionaryRequestTimeOut configuration under the Consumer.
<ConsumerList>
<Consumer>
<!-- Name is mandatory -->
<Name value="Consumer_1"/>
<DictionaryRequestTimeOut value="0"/>0
Answers
-
Hello @guchao691
Does the problem occur when you test at other times? Does the application download Dictionary from Real-Time provider or from the local file? You can check the <DictionaryType> node in EmaConfig.xml configuration file:
- <DictionaryType value="DictionaryType::ChannelDictionary"/>: API downloads Dictionary information from Real-Time provider
- <DictionaryType value="DictionaryType::FileDictionary"/>: API downloads Dictionary information from local files (<RdmFieldDictionaryFileName> and <EnumTypeDefFileName> nodes). If you are using this configuration, are those <RdmFieldDictionaryFileName> and <EnumTypeDefFileName> nodes point to the correct files path?
Can you replicate the issue on demand? If so, please enable the XML trace, replicate the issue and share the XML trace file. You can see how to enable the XML trace in "XML Trace" section of this EMA Configuration Overview article.
0 -
If it is not for US stock trading hours, it can be obtained normally.
Check that the configuration file is “<DictionaryType value="DictionaryType::ChannelDictionary"/>”
0 -
thanks.
If the local data dictionary is used, will there be updates in the future, and will it be necessary to synchronize updates from the server at a fixed time?
0 -
The data dictionary files are updated regularly. You can download them from Software Downloads. It is in the MDS - General product family and TREP Template Service Pack product.
Typically, you can update the data dictionary files when:
1. There are newly added fields and you want to get data from those fields.
2. Or, the application reports the following error:
value: OmmError
ErrorCode="FieldIdNotFound"
OmmErrorEnd0 -
Can you provide the download address of the dictionary?
If our application uses a local dictionary, but you update the dictionary after a period of time, but our application is not updated, will there be parsing errors?
0 -
The URL is https://my.refinitiv.com/content/mytr/en/downloadcenter.html. It is in the MDS - General product family and TREP Template Service Pack product.
Typically, the data dictionary is updated when there are new fields added to the data dictionary. If your subscribed RICs use those new fields, you will see the error in the application. Then, you need to upgrade the data dictionary.
However, if your subscribed RICs don't use those new fields, there is no need to update the data dictionary.
0
Categories
- All Categories
- 6 AHS
- 39 Alpha
- 161 App Studio
- 4 Block Chain
- 4 Bot Platform
- 16 Connected Risk APIs
- 47 Data Fusion
- 30 Data Model Discovery
- 608 Datastream
- 1.3K DSS
- 577 Eikon COM
- 4.9K Eikon Data APIs
- 7 Electronic Trading
- Generic FIX
- 7 Local Bank Node API
- Trading API
- 2.7K Elektron
- 1.3K EMA
- 236 ETA
- 519 WebSocket API
- 33 FX Venues
- 10 FX Market Data
- 1 FX Post Trade
- 1 FX Trading - Matching
- 12 FX Trading – RFQ Maker
- 5 Intelligent Tagging
- 2 Legal One
- 20 Messenger Bot
- 2 Messenger Side by Side
- 9 ONESOURCE
- 7 Indirect Tax
- 59 Open Calais
- 264 Open PermID
- 39 Entity Search
- 2 Org ID
- PAM
- PAM - Logging
- 8.4K Private Comments
- 6 Product Insight
- Project Tracking
- ProView
- ProView Internal
- 20 RDMS
- 1.4K Refinitiv Data Platform
- 367 Refinitiv Data Platform Libraries
- 3 Refinitiv Due Diligence
- LSEG Due Diligence Portal API
- 3 Refinitiv Due Dilligence Centre
- Rose's Space
- 1.1K Screening
- 18 Qual-ID API
- 13 Screening Deployed
- 23 Screening Online
- 10 World-Check Customer Risk Screener
- 990 World-Check One
- 44 World-Check One Zero Footprint
- 45 Side by Side Integration API
- Test Space
- 3 Thomson One Smart
- 1.2K TR Internal
- Global Hackathon 2015
- 2 Specialists Who Code
- 10 TR Knowledge Graph
- 150 Transactions
- 142 REDI API
- 1.7K TREP APIs
- 4 CAT
- 21 DACS Station
- 117 Open DACS
- 1.1K RFA
- 103 UPA
- 172 TREP Infrastructure
- 224 TRKD
- 886 TRTH
- 5 Velocity Analytics
- 5 Wealth Management Web Services
- 59 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛