Assertion when trying to connect to RTOv2

philippe.mesmeur
philippe.mesmeur Newcomer
edited September 23 in EMA

Hello,

I'm working on connecting my Java application to RTOv2. To do so, I use the RealTime SDK 3.8.3.0

I had to fight a little bit but now my application starts working fine 👍️

However, I realized that when the JVM option -ea (enable assertions) is enabled, my application crashes on the following method of the Realtime SDK:

/** class com.refinitiv.eta.transport.EncryptionOptionsImpl **/
public void KeystorePasswd(String KeystorePasswd) {
    assert KeystorePasswd != null : "KeystorePasswd must be non-null";

    this._KeystorePasswd = KeystorePasswd;
}

I can obtain the same behavior by running the main function of class com.refinitiv.ema.examples.training.consumer.series400.ex450_MP_QueryServiceDiscovery.Consumer

(I gave the following arguments to the main function: -clientId REMOVED -clientSecret REMOVED)

  • not specifying -ea to the jvm: the connection is OK
  • specifying -ea to the jvm: the program crashes with KeystorePasswd must be non-null

Any idea?

Regards,

Philippe

Answers

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @philippe.mesmeur

    Thank you for reaching out to us.

    Please use the RTSDK Java 2.3.1.L1 aka EMA/ETA 3.9.1.L1 aka 3.9.1.0 instead.

    I tested it and it doesn't crash with the -ea option.

  • Hello

    Thank you for the answer: you're right, upgrading to RTSDK 3.9.1.0 corrected the problem!!! thank you

    New question: after upgrading to RTSDK 3.9.1.0, although the compilation was OK, at runtime I had a NoSuchMethodError with the message 'org.apache.hc.core5.http.nio.ssl.TlsStrategy org.apache.hc.client5.http.ssl.ClientTlsStrategyBuilder.buildAsync()'


    I was able to correct this new issue by adding the following dependency:

        <dependency>
            <groupId>org.apache.httpcomponents.client5</groupId>
            <artifactId>httpclient5</artifactId>
        </dependency>
    

    I wonder if there are other dependencies that I have to add in order to avoid other Nosuchmethoderror? Are there recommendations about it?

    Regards,

    Philippe

  • Jirapongse
    Jirapongse ✭✭✭✭✭

    @philippe.mesmeur

    You can check its external dependencies from the README file.