question

Upvotes
Accepted
26 3 5 11

i am getting error Text: dictionary retrieval failed and Reason State: Closed/Suspect/None - text: "No data in cache." while i am testing using readme.txt provided in asiaCannedData for Elektron-SDK1.2.2.java .

elektronrefinitiv-realtimeelektron-sdkema-apirrtelektron-message-api
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Upvote
Accepted
9.6k 10 7 7

Hello @rkumar

Please try the following steps:

1.Copy enumtype.def and RDMFieldDictionary in asiaCannedData folder to [ESDK_ROOT]\ Java\Ema\Examples\src\main\java

2.Copy EmaConfig.xml in [ESDK_ROOT]\Java\Ema\Examples\src\main\etc to [ESDK_ROOT]\ Java\Ema\Examples\src\main\java . In the java folder, you should see like this:

3. In EmaConfig.xml from step 2(in java folder), change Dictionary_1 to be Dictionary_2 then save the file.

The Consumer_1 used by the application should be like this:

<Consumer>
	...		
	<Name value="Consumer_1"/>
	...	
	<Dictionary value="Dictionary_2"/>
	...
</Consumer>

4.Open [ESDK_ROOT]\Java\Ema\Examples\src\main\java\com\thomsonreuters\ema\examples\training\consumer\series100\example100__MarketPrice__Streaming\Consumer.java to use a RIC provided in Canned data by replacing IBM.N to a new one e.g. JPY=A and save the file.

consumer.registerClient(reqMsg.serviceName("DIRECT_FEED").name("JPY=A"), appClient);

5. Open cmd and go to [ESDK_ROOT]\Java\Ema\Examples\src\main\java to set the classpath. For example: if ESDK_ROOT is C:\Elektron-SDK1.2.2.java.rrg, the classpath is:

set
CLASSPATH=C:\Elektron-SDK1.2.2.java.rrg\Java\Ema\Libs\ema-3.2.2.0.jar;C:\Elektron-SDK1.2.2.java.rrg\Java\Eta\Libs\upa-3.2.2.0.jar;C:\Elektron-SDK1.2.2.java.rrg\Java\Eta\Libs\upaValueAdd-3.2.2.0.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Eta\Libs\jdacsUpalib.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\apache\commons-collections-3.2.2.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\apache\commons-configuration-1.10.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\apache\commons-lang-2.6.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\apache\commons-logging-1.2.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\SLF4J\slf4j-1.7.12\slf4j-api-1.7.12.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\SLF4J\slf4j-1.7.12\slf4j-jdk14-1.7.12.jar;C:\Elektron-SDK1.2.2.java.rrg\Elektron-SDK-BinaryPack\Java\Ema\Libs\xpp3-1.1.4c.jar;.

6. Compile the application at [ESDK_ROOT]\Java\Ema\Examples\src\main\java. For example:

javac C:\Elektron-SDK1.2.2.java.rrg\Java\Ema\Examples\src\main\java\com\thomsonreuters\ema\examples\training\consumer\series100\example100__MarketPrice__Streaming\*.java

7. Run the application at [ESDK_ROOT]\Java\Ema\Examples\src\main\java:

java com.thomsonreuters.ema.examples.training.consumer.series100.example100__MarketPrice__Streaming.Consumer

The figure showing step 5 to 7:


step5to7.png (59.5 KiB)
icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

@Pimchaya.Wongrukun Thanks alot it worked !!.

i was actually trying to implement a case where i could get real time bid and ask values for currencies . so can you please tell me where i could get RIC for all currencies and how could i get there real time values with timestamp. i want to keep my query as simple as possible just to filter and get as much info i need.

@rkumar

Please post your new questions as a separate question, not as a comment to the answer. When the answer of this post is accepted, marked as "correct", the community tends to only look at the accepted answer and may miss your new questions on the same topic. Posting the new questions on a separate page allows everyone can see the questions and can post answers to help you.

Upvotes
9.6k 10 7 7

Hello @rkumar

Have you done step 6 CONFIGURE CONSUMER FOR LOCAL DATA DICTIONARY in asiaCannedData/readme.html yet?

By default, EMA application loads dictionary from the server. Unfortunately, The sink_driven_src tool does not support dictionary download, so it does not send the dictionary back when EMA application requests the dictionary. Therefore before running the application, you need to configure the application to use the data dictionary files provided with the Elektron Test Data package. This will ensure that the consumer is using a data dictionary compatible with the captured data. For the step to do this, please refer to section 6.1 CONFIGURING EMA TO USE LOCAL DATA DICTIONARY FILES. in asiaCannedData/readme.html

Hope this help.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Hello @rkumar

When I did not do step 6, I got the similar error as yours:

After I follow the steps in section 6.1 of asiaCannedData/readme.html. The error did not occur.

Moreover, please check the application source code if it requests the RIC which canned data contains(listed in section 7). Otherwise, the application will get a state of the RIC like “state="Closed / Suspect / None / 'No data in cache.'" as shown below:

noric.png (7.4 KiB)
rkumar avatar image rkumar pimchaya.wongrukun01

i followed 6th step and copied RDMFieldDictionary and enumtype.def into my applications working directory (i.e - <ESDKroot>\Java\Ema\Examples\src\main\etc ) of Elektron-SDK1.2.2.java and even changed EmaConfig.xml to default consumer to "DictionaryId_2". but i am still getting same error and i am not getting what to do with section 7 thing , i dont know where to make changes for same. where to set RIC or something i have no idea about it.

Upvote
25.3k 87 12 25

Hi @rkumar

Are you sure the working directory is the src\main\etc directory?

The working directory will be dictated how you are running the application. e.g. for me my working directory (based on my environment and Java IDE) is - <ESDKroot>\Java\Ema\Examples

So, for me I place the EmaConfig,xml and dictionary files in the above folder when I run my application and I want to use local dictionary files, with the following EmaConfig.xml entries for Dictionary_2

<Name value="Dictionary_2"/>
  <DictionaryType value="DictionaryType::FileDictionary"/>
  <RdmFieldDictionaryFileName value="./RDMFieldDictionary"/>
  <EnumTypeDefFileName value="./enumtype.def"/>
</Dictionary>

In terms of using the correct RIC code, this is noted on the QuickStart page where it refers to the call to registerClient e.g.

consumer.registerClient( ReqMsg().serviceName( "ELEKTRON" ).name( "VOD.L" ), client );

You need to make sure the RIC code (VOD.L above) is one of the ones mentioned in section 7 of the asiaCanned.html file i.e. you need to make sure you are actually requesting an instrument for which data exists in the captured data file.

If the above talk of registerClient does not mean anything to you, then I recommend you read through the basic EMA Java tutorials.

icon clock
10 |1500

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.