Problem Description


XML based rest API source fails with the below error in UI during the metadata crawl.



The queryservice.out in the location $IW_HOME/platform/logs/ will have the below ERROR.


2020-04-30 15:38:53,207 ERROR [vert.x-worker-thread-2] service.RestApiController:95 : error: java.lang.NoClassDefFoundError: org/apache/http/impl/client/HttpClientBuilder

    at infoworks.tools.stub.GenericRestUtility.getDataFromURLApacheHttpClient(GenericRestUtility.java:232)
    at infoworks.tools.stub.GenericRestUtility.dumpSampleData(GenericRestUtility.java:302)
    at infoworks.tools.QueryServiceUtility.query.service.restapi.RestAPIIngestionService.getFlatSchema(RestAPIIngestionService.java:86)
    at infoworks.vertx.service.RestApiController.lambda$getFlatSchema$4(RestApiController.java:92)
    at io.vertx.core.impl.ContextImpl.lambda$executeBlocking$2(ContextImpl.java:272)
    at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)
    at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624)
    at io.netty.util.concurrent.FastThreadLocalRunnable.run(FastThreadLocalRunnable.java:30)
    at java.lang.Thread.run(Thread.java:748)


Cause


This happens if the required HTTP client jar is not present in the queryservice_classpath in conf.properties.


Solution


a) Login to the edge node as user who starts Infoworks Services.

b) Download the httpclient jar using the below command

wget https://repo1.maven.org/maven2/org/apache/httpcomponents/httpclient/4.5.3/httpclient-4.5.3.jar


c) Take the backup of conf.properties file in $IW_HOME/conf directory.



d) Add the absolute path of HTTP client jar at the beginning of the queryservice_classpath in the conf.properties file as shown below.


<Add the classpath text for reference>



e) Restart the query service.


Affected Versions


IWX Data Foundry 2.9.1 on Cloudera