Support Questions

Find answers, ask questions, and share your expertise
Announcements
Celebrating as our community reaches 100,000 members! Thank you!

HttpClient error with SelectHiveQL NiFi Processor

avatar
Rising Star

We are facing the HttpClient error when we try to fetch data from the Hive using the  SelectHiveQL NiFi Processor.

Please find the error details below and help us resolve this with your expertise. 

Controller Service - HiveConnectionPool

Database Connection URL: jdbc:hive2://localhost:10000/default;principal=hive@test@xyz.com
Hive Configuration Resources: /etc/hive/conf/hive-site.xml,/etc/hadoop/conf/core-site.xml

 

NagendraKumar_1-1721916322741.png

NiFi Processor - SelectHiveQL 

NagendraKumar_2-1721916579157.png

Error Message :

SelectHiveQL[id=23er-1234-9999-4444-17] org.apache.nifi.processors.hive.SelectHiveQL$$Lambda$2132/2007351143@6ab4a383 failed to process due to java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
- Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient; rolling back session: {}

SelectHiveQL[id=sge33-1234-9999-21-33] Processing halted: yielding [1 sec]: java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
- Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient

 

 

2 REPLIES 2

avatar
New Contributor

Hello,


@NagendraKumar My Indigo Cardwrote:

We are facing the HttpClient error when we try to fetch data from the Hive using the  SelectHiveQL NiFi Processor.

Please find the error details below and help us resolve this with your expertise. 

Controller Service - HiveConnectionPool

Database Connection URL: jdbc:hive2://localhost:10000/default;principal=hive@test@xyz.com
Hive Configuration Resources: /etc/hive/conf/hive-site.xml,/etc/hadoop/conf/core-site.xml

 

NagendraKumar_1-1721916322741.png

NiFi Processor - SelectHiveQL 

NagendraKumar_2-1721916579157.png

Error Message :

SelectHiveQL[id=23er-1234-9999-4444-17] org.apache.nifi.processors.hive.SelectHiveQL$$Lambda$2132/2007351143@6ab4a383 failed to process due to java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
- Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient; rolling back session: {}

SelectHiveQL[id=sge33-1234-9999-21-33] Processing halted: yielding [1 sec]: java.lang.NoClassDefFoundError: org/apache/http/client/HttpClient
- Caused by: java.lang.ClassNotFoundException: org.apache.http.client.HttpClient

 

 


Your NiFi isn't talking to Hive properly.

It sounds like there's a missing piece in your software that's stopping them from connecting.

Let's fix it:

  1. Check the connections: Make sure everything is plugged in correctly (figuratively speaking).
  2. Look for missing software: You might need to add something to NiFi to make it work.
  3. Restart NiFi: Sometimes, a simple restart can fix weird computer problems.

If this doesn't work, you might need to ask for more help from NiFi experts.

Let me know if you need more help!

avatar
Rising Star

Hi @monica345 ,

Thanks a lot for your valuable input!

We have restarted the NiFi multiple times and find below the list of jar files placed in the NiFi lib folder. Please let us know if there is any additional jar file that needs to be used in NiFi for connecting to Hive. Thanks!

slf4j-api-2.0.6.jar
nifi-stateless-bootstrap-1.18.0.2.1.5.3000-3.jar
nifi-stateless-api-1.18.0.2.1.5.3000-3.jar
nifi-server-api-1.18.0.2.1.5.3000-3.jar
nifi-runtime-1.18.0.2.1.5.3000-3.jar
nifi-property-utils-1.18.0.2.1.5.3000-3.jar
nifi-properties-1.18.0.2.1.5.3000-3.jar
nifi-nar-utils-1.18.0.2.1.5.3000-3.jar
nifi-framework-api-1.18.0.2.1.5.3000-3.jar
nifi-api-1.18.0.2.1.5.3000-3.jar
logback-core-1.3.5.jar
logback-classic-1.3.5.jar
log4j-over-slf4j-2.0.6.jar
jul-to-slf4j-2.0.6.jar
jetty-schemas-5.2.jar
jcl-over-slf4j-2.0.6.jar
javax.servlet-api-3.1.0.jar
aspectjweaver-1.9.6.jar
oracle-connector-java.jar
mysql-connector-java.jar
ojdbc8.jar
ojdbc10.jar
hive-jdbc-3.1.3000.7.1.7.2000-305.jar
libthrift-0.9.3.jar