question

Upvotes
Accepted
3 2 4 4

java.lang.NoClassDefFoundError: org/apache/http/HttpHost Error while running ETA

Hi Team,

I've download and trying to run ETA Consumer as per the below doc,

https://developers.refinitiv.com/elektron/elektron-sdk-java/learning?content=43211&type=learning_material_item

Changed the ELEKTRON_JAVA_HOME and binary versions into 3.4.0.0. The compilation is success but failed while running the first tutorial. Is there i need to specify the http lib or need to configure some file(s)?

I cross verified few files and couldn't find config related to http lib. Any help or suggestion much appreciated. Thank you!

Exception in thread "main" java.lang.NoClassDefFoundError: org/apache/http/HttpHost
    at com.thomsonreuters.upa.valueadd.reactor.ReactorOptions.clear(ReactorOptions.java:343)
    at com.thomsonreuters.upa.valueadd.reactor.ReactorOptions.<init>(ReactorOptions.java:60)
    at com.thomsonreuters.upa.valueadd.reactor.ReactorFactory.createReactorOptions(ReactorFactory.java:90)
    at com.thomsonreuters.upa.tutorials.valueadd.consumer.tutorial2.basicConsumer.<init>(basicConsumer.java:70)
    at com.thomsonreuters.upa.tutorials.valueadd.consumer.tutorial2.basicConsumer.main(basicConsumer.java:416)
Caused by: java.lang.ClassNotFoundException: org.apache.http.HttpHost


elektronrefinitiv-realtimeelektron-sdkrrteta-apielektron-transport-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.

Upvotes
Accepted
17k 80 39 63

Hi @Thangavel.Loganathan,

The recent version of Elektron now requires the httpcore-4.4.12.jar file.

As @zoya.farberov pointed out, it is in a directory off of the root, i.e.

$ELEKTRON_JAVA_HOME\Elektron-SDK-BinaryPack\Java\Eta\Libs\ApacheClient\httpcore-4.4.12.jar.

I've addressed the issue by updating the download package from the tutorial. You can do either of the following:

  • Download the new tutorial package OR
  • Update your run scripts to include the above JAR file

Let us know if this resolves your issue.

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 @Thangavel.Loganathan

It isn’t the SDK that needs updating. You also don’t need to download the .jar file but simply update the run scripts to point to the .jar file that should already be contained within your SDK.

Alternatively, you can download the tutorial examples again - the run scripts have been corrected in the new package. I hope this is clear.

yeah Nick, it's clear now. Thank you very much. I'm trying to run the second example, facing the below error,

Connection down reconnecting
    Error text: java.nio.channels.UnresolvedAddressException

I see the basicConsumer.java file contains the below host name and port, is this fine to run or need to modify?

    private static final String srvrHostname = "elektron";
    private static final String srvrPortNo = "14002";

Hi @Thangavel.Loganathan,

The tutorial download package is specifically designed to connect to a deployed or hosted Elektron environment. If this is what you are planning on working against, you will need to reach out to your Market Data Manager to get server details. However, if you are only interested in connecting to the Refinitiv Data Platform (ERT in Cloud), these tutorials will not work against them. However, the Elektron SDK you downloaded does contain some examples that were built specifically for this type of connection. If you refer to the ETA Quick Start - Connecting to Elektron Real Time in Cloud, this should work.

Show more comments

Hi Nick,

Thanks for your reply, i downloaded httpcore-4.4.12 manually and put it inside and can run now first tutorial successfully. Please keep me posted if the SDK updated.

Upvotes
32.2k 40 11 19

Hello @Thangavel.Loganathan,

Within Elektron SDK installation, in Elektron-SDK-BinaryPack

Elektron-SDK-YOURVERSION.java.rrg\Elektron-SDK-BinaryPack\Java\Eta\Libs\ApacheClient

There are included several useful Apache jars, including httpcore that includes this class.

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 Zoya,

Thank you so much for your reply, i have downloaded the latest version of Elektron-SDK which is Elektron-SDK-1.4.0.L1.java.rrg doesn't contains any ApacheClient inside Lib Folder. Could you please cross verify at your end?

@Thangavel.Loganathan

Yes. I see it in

Elektron-SDK-1.4.0.L1.java.rrg\Elektron-SDK-BinaryPack\Java\Eta\Libs

Do you see it now?

I just downloaded new E-SDK but no luck i couldn't see in it. :-(

Upvotes
3 2 4 4

Hi Nick,

am running the below shell command from the below <ESDK>/Java directory,

gradlew runVAConsumer -PcommandLineArgs="-uname <ERT username/machind ID> -passwd <ERT password> -clientId <App Key> -keyfile <KeyStore file> -keypasswd <KeyStore passowrd> -connectionType encrypted -c amer-1.pricing.streaming.edp.thomsonreuters.com:14002 ELEKTRON_DD mp:IBM.N -sessionMgnt"

Getting the below error,

Connection down reconnecting: Channel java.nio.channels.SocketChannel[connected local=/10.44.27.174:51156 remote=amer-1.pricing.streaming.edp.thomsonreuters.com/34.233.36.26:14002]
        Error text: Error initializing channel: errorId=0 text=null

When i ping amer-1.pricing.streaming.edp.thomsonreuters.com

EPPLGDAW0104:Java thangavel_loganathan$ nc -vz amer-1.pricing.streaming.edp.thomsonreuters.com 14002
found 0 associations
found 1 connections:
     1:    flags=82<CONNECTED,PREFERRED>
    outif utun1
    src 10.44.27.174 port 51306
    dst 34.233.36.26 port 14002
    rank info not available
    TCP aux info available

Connection to amer-1.pricing.streaming.edp.thomsonreuters.com port 14002 [tcp/*] succeeded!

any idea on this? Thanks in advance!

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 @Thangavel.Loganathan,

Just to confirm, are you typing in the exact command above? I just want to make sure you are entering your credentials properly - as opposed to <EDP Password> for example. As a simple test to see if your credentials are valid, download the SpeedGuide tool.

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.