We are getting 'OmmInvalidUsageException after updating our application with EMA library version Rea
We were using ema SDK version 3.3.0 previously and are suggested to upgrade it to EMA version Real-Time-SDK-1.5.1.L1.java / ema SDK version 3.5.1. After upograding to the said library we are not able to connect to Reuter Elektron stream and are getting exception at the time of creating the consumer object. Below is the exception. Please let us know what is the issue.
2020-12-02 05:59:31,759 ERROR Thread-7 OmmConsumerImpl loggerMsg
ClientName: ChannelCallbackClient
Severity: Error
Text: Failed to add RsslChannel(s) to RsslReactor. Channel name(s)
Instance Name Consumer_3_1
RsslReactor @10dbddc6
RsslChannel null
Error Id -6
Internal sysError 0
Error Location Reactor.copyOAuthCredentialForSessionManagement
Error Text Failed to copy OAuth credential for enabling the session management; OAuth client ID does not exist.
loggerMsgEnd
Exception Type='OmmInvalidUsageException', Text='loggerMsg
ClientName: ChannelCallbackClient
Severity: Error
Text: Failed to add RsslChannel(s) to RsslReactor. Channel name(s)
Instance Name Consumer_3_1
RsslReactor @10dbddc6
RsslChannel null
Error Id -6
Internal sysError 0
Error Location Reactor.copyOAuthCredentialForSessionManagement
Error Text Failed to copy OAuth credential for enabling the session management; OAuth client ID does not exist.
loggerMsgEnd
', Error Code='-6'
at com.thomsonreuters.ema.access.OmmBaseImpl.ommIUExcept(OmmBaseImpl.java:1578)
at com.thomsonreuters.ema.access.ChannelCallbackClient.initializeReactor(ChannelCallbackClient.java:901)
at com.thomsonreuters.ema.access.ChannelCallbackClient.initializeConsumerRole(ChannelCallbackClient.java:973)
at com.thomsonreuters.ema.access.OmmConsumerImpl.handleAdminDomains(OmmConsumerImpl.java:446)
at com.thomsonreuters.ema.access.OmmBaseImpl.initialize(OmmBaseImpl.java:285)
at com.thomsonreuters.ema.access.OmmConsumerImpl.<init>(OmmConsumerImpl.java:43)
at com.thomsonreuters.ema.access.EmaFactory.createOmmConsumer(EmaFactory.java:237)
at com.integral.adaptor.RTRELEKTRON.comm.ETRON.ETRONSessionManager$CreateMktDataSession.run(ETRONSessionManager.java:357)
at java.lang.Thread.run(Thread.java:745)
Best Answer
-
You will need a machine ID, associated password and a Client ID to get data from Refinitiv Realtime Optimized, formerly called Elektron Cloud.
Seems like you are not passing in the client ID parameter, or passing in an invalid Client ID. Please see this tutorial on how to create a Client ID for your application.
0
Answers
-
Hi @Gurpreet,
I have now generated the client ID from the below link for our application.
https://emea1.apps.cp.thomsonreuters.com/apps/AppkeyGenerator
I am passing userID, password and the generated clientID to connect as below.
consumer = EmaFactory.createOmmConsumer(config.consumerName(consumerName).username(userName).password(userPwd).clientId(clientId));
Now application is able to connect and getting rates. But I have received the below error message. Please let me know the implications of this error message and what needs to be done from our side to remove this error.
Note: Our application keep getting rates even after receiving this error message.
2020-12-03 04:29:20,068 WARN I/O dispatcher 1 loggerMsg
ClientName: ChannelCallbackClient
Severity: Warning
Text: Received Channel warning event on channel Channel_4
Instance Name Consumer_3_1
RsslReactor @21f12d69
RsslChannel @352410bd
Error Id 0
Internal sysError 0
Error Location null
Error text Failed to request authentication token with refresh token for user: GE-A-00336937-3-2529. Will try again with user name and password.
loggerMsgEnd
0 -
Hi @Gurpreet,
Can we get any documentation or list of error types/messages that we can receive via the status message on OmmConsumerClient.onStatusMsg() callback?
It will help us to equip our application with better error handlings.
Thanks.
0 -
Does the application stop receiving updates after this error? Access token is refreshed every 5 minutes.
Can you please try to run the sample ema\examples\training\consumer\series400\ex450_MP_QueryServiceDiscovery and replicate this behavior?
0 -
I looked at your application error message again, and since you describe that it keeps on getting data - here is what is happening:
You have another application with the same credentials which is stealing the refresh token from this application. Both apps are fighting and using the password grant when the refresh grant fails. Please use credentials in one instance of the application only.
0 -
Hi @Gurpreet,
Previously I was using a different client id generated by Sunil. Now I generated a fresh clientId for my use and using it along with the same userId and password to connect.
Still I am getting the error. The error is coming only once approximately after 5 min of starting the application. But I am receiving the rates as usual even after getting that error.
I am using the same api from 3.5.1 library as I was using in lib version 3.3.0 previously. Only difference is I am passing the clientID parameter extra.
Should we continue to use the same api/data callback mechanism as we were doing with older library? Or do we have to handle it differently in this new library?
Please let us know.
0 -
I used the ServiceEndPointDiscovery api with dynamic emaconfig creation after getting the host and port information and then registering the client and consumer with takeExclusiveSignOnControl as true, I am able to connect and the said error exception is not coming. I am receiving rates as well. I have not used proxy information while registering for the service discovery.
serviceDiscovery.registerClient(EmaFactory.createServiceEndpointDiscoveryOption().username(userName).password(userPwd).clientId(clientId).transport(ServiceEndpointDiscoveryOption.TransportProtocol.TCP).takeExclusiveSignOnControl(takeExclusiveSignOnControl), endPointDiscoveryHandler);
consumer = EmaFactory.createOmmConsumer(config.consumerName(consumerName).username(userName).password(userPwd).clientId(clientId).takeExclusiveSignOnControl(takeExclusiveSignOnControl).config(configDb));
0 -
Not just client ID, you will need a new userID, password and a client ID, for your new application.
0 -
I used the ServiceEndPointDiscovery api with dynamic emaConfig creation after getting the host and port information and then registering the client and consumer with takeExclusiveSignOnControl as true, I am able to connect and the said error exception is not coming. I am receiving rates as well. I have not used proxy information while registering for the service discovery.
serviceDiscovery.registerClient(EmaFactory.createServiceEndpointDiscoveryOption().username(userName).password(userPwd).clientId(clientId).transport(ServiceEndpointDiscoveryOption.TransportProtocol.TCP).takeExclusiveSignOnControl(takeExclusiveSignOnControl), endPointDiscoveryHandler);
consumer = EmaFactory.createOmmConsumer(config.consumerName(consumerName).username(userName).password(userPwd).clientId(clientId).takeExclusiveSignOnControl(takeExclusiveSignOnControl).config(configDb));
Is this a safe way to have a better connection experience with the new library or something else has to be done?
0 -
The example consumer\series100\ex113_MP_SessionMgmt shows all the steps which need to be done. Please refer to that sample.
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
- 60 Workspace SDK
- 9 Element Framework
- 5 Grid
- 13 World-Check Data File
- Yield Book Analytics
- 46 中文论坛