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


Best Answer

  • nick.zincone
    nick.zincone admin
    Answer ✓

    Hi @Thangavel.Loganathan,

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

    As @zoya faberov 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.

Answers