Support Questions
Find answers, ask questions, and share your expertise
Announcements
Alert: Welcome to the Unified Cloudera Community. Former HCC members be sure to read and learn how to activate your account here.

Hive JDBC driver containing classes with strange prefix

Highlighted

Hive JDBC driver containing classes with strange prefix

New Contributor

Dear experts,

 

we are trying to establish a connection with Hive via ZooKeeper using JDBC.

We use custom built Java connector, which runs just fine on its own (bringing its own set of jars).

Externally (in dedicated directory), we can pull in other jars which will be loaded in addition during runtime. This way we bring in 3 jars copied from Hortonworks cluster:

hadoop-jdbc-standalone.jar

hadoop-common.jar

hadoop-auth.jar

 

Accoring to the articles I've read, these should be sufficient.

But as soon as we try to establish a connection, we start running into "java.lang.NoClassDefFoundError"s.
We have tried to copy more jars with missing classes in attempts to provide the class definitions, but there's one common thing which seems very off.

The reported missing classes are already present within hadoop-jdbc-standalone.jar, but they contain "org.apache.hive." prefix.

 

Error example 1:

java.lang.NoClassDefFoundError: org/slf4j/LoggerFactory

-- class found in hive-jdbc-standalone.jar: org/apache/hive/org/slf4j/LoggerFactory

 

Error example 2:

java.lang.NoClassDefFoundError: org/apache/commons/lang/StringUtils

-- class found in hive-jdbc-standalone.jar: org/apache/hive/org/apache/commons/lang/StringUtils

 

Error example 3:

java.lang.NoClassDefFoundError: org/apache/curator/framework/api/ACLProvider

-- class found in hive-jdbc-standalone.jar: org/apache/hive/org/apache/curator/framework/api/ACLProvider

 

Has anyone met with this problem?

Any ideas what might be in play here or how to solve this please?

 

Thanks a lot for any hints

Jan

Don't have an account?
Coming from Hortonworks? Activate your account here