question

Upvotes
Accepted
1 0 0 2

Java coding query

modified.png

*** 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

rrtojava
modified.png (157.4 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.

Upvotes
Accepted
16.7k 42 12 19

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.

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
16.7k 42 12 19

Hi @Marlon.Tirana,

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.

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.

Upvotes
21 0 0 1

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).

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
16.7k 42 12 19

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.

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.

Upvotes
1 0 0 1

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!




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.

Hi @Vanessa Domo,

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.


Upvotes
16.8k 31 9 12

Hello @Vanessa Domo @Marlon.Tirana

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:


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.

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?


ty

image004.png

image004.png (502.9 KiB)
Upvotes
16.8k 31 9 12

Hello @Marlon.Tirana

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).

restrequesttimeout.png


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.

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:
image005.png


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)

image005.png (15.7 KiB)

Hello @Marlon.Tirana

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.