Java coding query
*** More details:1/ in our demo application,which we can send you afterward directly through email because attachment has limit of 10mb,but we are sending you image of code for that class which causing issue, and there would like to focus you on this line:ommConsumer = EmaFactory.createOmmConsumer( config );
where we always get ommConsumer to be null – which is reason why our memory constantly increases (as we are constantly trying to create ommConsumer).
2/ please NOTE:
that we put wrong password on purpose, because like that would like to stimulate real life example what could happen if for any reason (bad connection for example) we can not create ommConsumer for lets say few hours. Then as consequence our memory constantly increasing and can cause ERROR memory leak.
3/ As proof that memory constantly increasing, we are sending you snaps of jprofiler (taken on each 5 minutes), where you can see that memory constantly increasing because of this 3 objects: BufferImpl, ElementSetDefEntryImpl, FieldSetDefEntryImpl
*** Question_1:
Do you maybe have some suggestion how we can destroy those 3 objects (we could not find the way because ommConsumer is constantly null), or some alternative way with goal to avoid memory leak error after constantly trying to create ommConsumer?
*** Question_2:
Is it possible to avoid constantly getting ERROR message in log file (to be displayed just once, or never):
com.refinitiv.ema.access.ChannelCallbackClient initializeReactor
SEVERE: loggerMsg
ClientName: ChannelCallbackClient
Severity: Error
Text: Failed to add RsslChannel(s) to RsslReactor. Channel name(s)
Instance Name Consumer_1_4
RsslReactor @69c79f09
RsslChannel null
Error Id -1
Internal sysError 0
Error Location RestProxyAuthHandler.execute
Error Text Failed to send HTTP request. Text: {"error":"access_denied" ,"error_description":"Invalid username or password." }
loggerMsgEnd
Best Answer
-
Hello @zeljko.simic,
This issue has been fixed in the latest release of RTSDK 2.7.0.L1. I have verified and not longer see heap memory leak, and objects are being released properly now. Please download this release and try again.
Thanks.
0
Answers
-
Hi @marlon_T,
Your approach to this is wrong - the OMMConsumer should not be null. Please focus on fixing this through your configuration or network changes, instead of endlessly trying to create a new Consumer object.
Since you are connecting to RTO, the Example 113 session management, would be a good starting point for your application. Ensure that you are able to connect and subscribe successfully using this sample, before modifying it to your needs.
0 -
Hi,
Thank you for your suggestion, but we still have issue, let me please try to describe briefly:We are trying to determine the root cause of our application memory footprint increase in cases where it tries to reconnect to Refinitiv without success. We have deliberately misconfigured Refinitiv connectivity parameters on our end to reproduce unsuccessful reconnect attempts. We have noticed that in such cases allocated heap memory for the application gets exhausted and application goes offline, and we want to prevent such scenario in cases where we lose connectivity with Refinitiv for a longer period of time (due to networking issues or some other external cause).
0 -
Hi @zeljko.simic,
I have checked and also see the heap memory increase, when the OMMConsumer does not connect and a new one is created. Since the RTSDK is open source and supported on the github, I have raised an issue for it - you can follow the response from development directly over there.
0 -
Hi @Gurpreet,
Would you kindly assist with the below follow-up query?Hi, can you please provide me list of necessary jars? I tried with 4, but cannot successfully run Refinitiv
- ema-3.6.7.0
- eta-3.6.7.0
- etaConvert-3.6.7.0
- etaValueAdd-3.6.7.0
Should I import some extra jar, beside those 4?
CC @Marlon.Tirana
Thanks!
0 -
Hello @Vanessa Domo @marlon_T
The EMA Java com.refinitiv.ema.examples.training examples applications need the following jars:
- ema-3.6.7.0.jar (from Java\Ema\Libs\ folder)
- eta-3.6.7.0.jar (from Java\Eta\Libs\ folder)
- etaValueAdd-3.6.7.0.jar (from Java\Eta\Libs\ folder)
- etajConverter-3.6.7.0.jar (from Java\Eta\Libs\ folder)
- ansipage-3.6.7.0.jar (from Java\Eta\Libs\ folder)
- xpp3-1.1.4c.jar (from RTSDK-BinaryPack\Java\Ema\Libs folder)
- commons-collections4-4.4.jar (from RTSDK-BinaryPack\Java\Ema\Libs\apache\ folder)
- commons-configuration2-2.8.0.jar (from RTSDK-BinaryPack\Java\Ema\Libs\apache\ folder)
- commons-lang3-3.9.jar (from RTSDK-BinaryPack\Java\Ema\Libs\apache\ folder)
- commons-logging-1.2.jar (from RTSDK-BinaryPack\Java\Ema\Libs\apache\ folder)
- commons-text-1.8.jar (from RTSDK-BinaryPack\Java\Ema\Libs\apache\ folder)
- commons-codec-1.11.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- httpclient-4.5.13.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- httpclient-cache-4.5.13.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- httpcore-4.4.13.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- httpcore-nio-4.4.13.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- httpmime-4.5.13.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- mockito-all-1.9.0.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ApacheClient\ folder)
- slf4j-api-1.7.32.jar (from RTSDK-BinaryPack\Java\Eta\Libs\SLF4J\slf4j-1.7.32t\ folder)
- slf4j-jdk14-1.7.32.jar (from RTSDK-BinaryPack\Java\Eta\Libs\SLF4J\slf4j-1.7.32t\ folder)
- jackson-annotations-2.12.7.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ folder)
- jackson-core-2.12.7.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ folder)
- jackson-databind-2.12.7.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ folder)
- json-20210307.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ folder)
- lz4-java-1.8.0.jar (from RTSDK-BinaryPack\Java\Eta\Libs\ folder)
Alternatively, if the client uses the Java build automation tool like Apache Maven, the client can set the above dependencies for EMA 3.6.7 via the Maven pom.xml file.
<dependency>
<groupId>com.refinitiv.ema</groupId>
<artifactId>ema</artifactId>
<version>3.6.7.1</version>
</dependency>For more detail about using EMA Java API with Maven, please check the following articles:
- How to Set Up Refinitiv Real-Time SDK Java Application with Maven
- How to Set Up Real-Time SDK Java Application with Maven on the Eclipse IDE
0 -
@Vanessa Domo,Hi
Kindly keep a question focussed on a single issue, and ask a new problem in a new question - this helps us track the answer progress. Thanks.
0 -
Hi @wasin.w ,
kindly assist with the follow up of the client:1/ I am getting this error after upgrading new SDK.
2/ according to error, issue is related to network, but if network is problem, then how I can connect with old SDK, and with new SDK I am getting this error.
Maybe you have some suggestions what could be?
ty0 -
Hello @marlon_T
This is a new issue/question. Kindly keep a question focussed on a single issue, and ask a new problem in a new question - this helps us track the answer progress.
Based on the given log, the application seems to connect to the Refinitiv Real-Time Optimized (RTO), am I correct?
The error messages indicate that the API tried to send an HTTP authentication request message to the RDP Authentication service (normally "http://api.refinitiv.com/auth/oauth2/v1/token" URL endpoint), but encountered a connection timeout instead.
To let us understand the client application and the issue better, please ask the client for the following information:
- The version of JDK
- What is the old SDK version that works fine?
- Did the client upgrade the ETA jar files to be the same version as the EMA jar files?
- Are there any changes besides the SDK file?
- Can the client replicate the issue with the EMA Java example ex450_MP_QueryServiceDiscovery? The client can check how to run the example application from the EMA Java - RTO Quick Start guide.
Alternatively, the client can customize the HTTP request timeout from the "RestRequestTimeOut" parameter in the Consumer node of the EmaConfig.xml file (the file must be placed at the application working directly).
0 -
Hi @wasin.w ,
Kindly assist with the ff up of the client:
I have question (few days ago I sent wrong image error, and now I am back with correct error which I am getting).
description:
With old SDK everything works fine, but after upgrading to new SDK (version 3.6.7.0), I am getting this error:If you have any ideas what could be?
(I upgraded all other .jars as well, like: ema-3.6.7.0.jar, eta-3.6.7.0.jar, etajConverter-3.6.7.0.jar, etaValueAdd-3.6.7.0.jar, ansipage-3.6.7.0.jar, commons-lang3-3.9.jar, commons-text-1.8.jar, lz4-java-1.8.0.jar, and all others)
0 -
Hello @marlon_T
This is a new issue/question. Kindly keep a question focussed on a single issue, and ask a new problem in a post - this helps us track the answer progress.
This error message means the EMA API cannot locate the EmaConfig.xml configuration file. The API automatically looks for the file in the application working directory and the classpath resources.
The application can configure the API to get the EmaConfig.xml file from other locations too. The client can find the example code. from the ex111_MP_UserSpecifiedFileCfg example.
Again, please ask a new question in a new forum post. this helps us track the answer progress.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
- 685 Datastream
- 1.4K DSS
- 616 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
- 252 ETA
- 557 WebSocket API
- 38 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
- 654 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
- 27 DACS Station
- 121 Open DACS
- 1.1K RFA
- 104 UPA
- 193 TREP Infrastructure
- 229 TRKD
- 917 TRTH
- 5 Velocity Analytics
- 9 Wealth Management Web Services
- 90 Workspace SDK
- 11 Element Framework
- 5 Grid
- 18 World-Check Data File
- 1 Yield Book Analytics
- 46 中文论坛