Reply
Explorer
Posts: 17
Registered: ‎11-03-2016

java.lang.NoClassDefFoundError: org/apache/http/client/utils/URIBuilder when KMS is used

Hi Team,

 

In the CDH cluster (5.7.4) with Cloudera Navigator with Key Trustee KMS setup,  I'm getting the following error from one of the Java application.   Any help will be apprecaited.

 

CDH 5     5.7.4-1.cdh5.7.4.p0.2
KEYTRUSTEE     5.8.2-5.KEYTRUSTEE5.8.2.p0.1     
KEYTRUSTEE_SERVER     5.7.0-1.keytrustee5.7.0.p0.5

 

I found this could be similar to

 

https://github.com/prestodb/presto-hadoop-apache2/issues/15

https://issues.apache.org/jira/browse/HADOOP-11329

 

Any thoughts to fix this ?

 

 Many thanks in advance.

 

java.lang.NoClassDefFoundError: org/apache/http/client/utils/URIBuilder at org.apache.hadoop.crypto.key.kms.KMSClientProvider.createURL(KMSClientProvider.java:495) at org.apache.hadoop.crypto.key.kms.KMSClientProvider.decryptEncryptedKey(KMSClientProvider.java:835) at org.apache.hadoop.crypto.key.KeyProviderCryptoExtension.decryptEncryptedKey(KeyProviderCryptoExtension.java:388) at org.apache.hadoop.hdfs.DFSClient.decryptEncryptedDataEncryptionKey(DFSClient.java:1439) at org.apache.hadoop.hdfs.DFSClient.createWrappedInputStream(DFSClient.java:1509) at org.apache.hadoop.hdfs.DistributedFileSystem$3.doCall(DistributedFileSystem.java:311) at org.apache.hadoop.hdfs.DistributedFileSystem$3.doCall(DistributedFileSystem.java:305) at org.apache.hadoop.fs.FileSystemLinkResolver.resolve(FileSystemLinkResolver.java:81) at org.apache.hadoop.hdfs.DistributedFileSystem.open(DistributedFileSystem.java:305) at org.apache.hadoop.fs.FileSystem.open(FileSystem.java:778) at <COMPAY>.etl.filesystem.HDFSFile.openInputStream(HDFSFile.java:182) at

Champion
Posts: 176
Registered: ‎05-16-2016

Re: java.lang.NoClassDefFoundError: org/apache/http/client/utils/URIBuilder when KMS is used

You may not have appropriate Jar in your class path thats the reaon it is throwing java.lang.NoClassDefFoundError

i belive you are missing the in the httpclient-4.2.jar in your Java application classpath. When you extra the jar you could see the below class.

org.apache.http.client.utils.URIUtils.class

 

Explorer
Posts: 17
Registered: ‎11-03-2016

Re: java.lang.NoClassDefFoundError: org/apache/http/client/utils/URIBuilder when KMS is used

Hi csguna,

 

Thank you for the response.  My apologies for the delayed response.  

 

Yes, it was the class not found error. The httpclient-4.2.5.jar was placed in the application environment and restart of the services picked the required Jar and started working fine.  

 

Thanks once again. 

 

Cheers

Nagaraj C

Announcements
New Solutions