Support Questions

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

create connection between Dbeaver and Hive on a CDP 7.1.6 from a Mac OS

avatar
New Contributor

Hi folks!

 

I’m trying to create a connection between Dbeaver and Hive on a CDP 7.1.6 from a Mac OS Ventura 13.1 (22C65).

 

I used the Apache Hive connection option;

 

Put this sring on Host path on the main page…:

 

host:port,host:port,host:port,host:port,host:port/default;httpPath=cliservice;password=xxxxxx;principal=hive/_HOST@host.domain;serviceDiscoveryMode=zooKeeper;transportMode=http;user=xxxx;zooKeeperNamespace=hiveserver2

 

…and Host/IP, user and password on the SSH page (It is working fine).

 

On the Driver library added the jars files:

log4j-slf4j-impl-2.10.0.jar

slf4j-log4j12-1.7.30.jar

 

But I’m keep receiving this message:

 

Error:

 

Can't create driver instance

  Error creating driver 'Hadoop / Apache Hive' instance.

Most likely required jar files are missing.

You should configure jars in driver settings.

 

Reason: can't load driver class 'org.apache.hive.jdbc.HiveDriver'

  Error creating driver 'Hadoop / Apache Hive' instance.

Most likely required jar files are missing.

You should configure jars in driver settings.

 

Reason: can't load driver class 'org.apache.hive.jdbc.HiveDriver'

    org.apache.hive.jdbc.HiveDriver

    org.apache.hive.jdbc.HiveDriver

 

I don't know what to in drever settings. 

3 REPLIES 3

avatar
Rising Star

Hi @fabio_bd_araujo ,

We recommend you to download the latest Cloudera JDBC Driver here:
https://www.cloudera.com/downloads/connectors/hive/jdbc/2-6-21.html
Then in your DBeaver connection settings, go to Edit Driver Settings button and then to tab Libraries.

There you will see the current jar, which is the default Apache Driver.

Remove and then add the downloaded Cloudera jar.

 

You should be able to connect using your usual string connection.

 

 

Ps: You don't need to add log4j libraries. Cloudera Driver already have a logging option.

Check the documentation here (page 27):

https://docs.cloudera.com/documentation/other/connectors/hive-jdbc/2-6-21/Cloudera-JDBC-Connector-fo...

 

Good luck!

avatar
Expert Contributor

Note the class should be com.cloudera.hive.jdbc.HS2Driver

Make sure to use the parameters as detailed in the driver docs shared on the previous response

A sample KNOX JDBC string looks similar to this:

jdbc:hive2://<HOST>:8443/default;SSL=1;SSLTrustStore=/etc/truststore.jks;SSLTrustStorePwd=changeit;AuthMech=3;TransportMode=http;httpPath=gateway/cdp-proxy-api/hive;UseNativeQuery=0;IgnoreTransactions=1;LogLevel=6;LogPath=/tmp/jdbc/

When all details have been entered, click on Test Connection

Good Luck!

avatar

create connection between Dbeaver and Hive on a CDP 7.1.8 
centos 7

cloudera 7.1.8

i am also facing same issue in cluster Kerberos is enabled


Screenshot 2023-08-30 at 8.02.13 AM.pngScreenshot 2023-08-30 at 8.05.03 AM.png