I'm trying to run a legacy project that connects to HBase.
It has (among other dependencies):
<dependency>
<groupId>org.apache.hbase</groupId>
<artifactId>hbase-client</artifactId>
<version>1.2.0-cdh5.7.2</version>
</dependency>
When the application starts and reaches this code within the method of createConnection in the class of org.apache.hadoop.hbase.client.ConnectionFactory:
try{
....
return (Connection) constructor.newInstance(conf, managed, pool, user);
} catch (Exception e) {
throw new IOException(e);
}
An exception is thrown and caught, saying that:
java.lang.NoClassDefFoundError: org/apache/hadoop/crypto/key/KeyProviderTokenIssuer
So I was looking for this class of KeyProviderTokenIssuer in Google but didn't find where it should come from.
Why the system is trying to use this class and where should I get it from? Crypto package is not part of the hbase-client dependency and I don't see such in https://mvnrepository.com/
Is it possible that there is some library mismatch here?
I'm running on Windows. Can it be related?
I was able to overcome this issue after performing several steps:
Following this post , I downloaded the file of
hadoop-common-2.2.0-bin-master.zipand fully extracted it to the folder ofC:\Program Files\apache\hadoop\binI added the
HADOOP_HOMEparam to the system variables, pointing it toC:\Program Files\apache\hadoopI added to the
PATHvariable the value of%HADOOP_HOME%\binSince my Hadoop is version 2.6.0 I checked and made sure that all Hadoop related dependencies are in that version.
I run
mvn dependency:treeand found that one of the dependencies jars is bringing with it the jar oforg.apache.hadoop:hadoop-hdfs-client:jar:3.2.0so I excluded it from the dependency:Some URLs that helped me:
talend
winutils.exe repository
srccodes.com