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.

Hue, JDBC and my JAR file

Hue, JDBC and my JAR file

New Contributor

Dear all,

I am struggeling with some problems regarding a JAR file and HUE. 

 

As outlined here it's possible to integrate a database in HUE. 

So I try to do this as well. Therefor I downloaded a JAR file and try to integrate this in HUE. 

 

So I added a notebook and my code looks like the following lines

 

[notebook]
show_notebooks=true
[[interpreters]]
[[[hive]]]
name = Hive
interface = hiveserver2
[[[jdbc]]]
name=JDBC
interface=jdbc
options='{"url": "jdbc:drill:zk=r2c00.pmd.local:2181,r2c01.pmd.local:2181,r2c02.pmd.local:2181/drill/pacluster;schema=pacs2","driver": "org.apache.drill.jdbc.Driver","user": "admin","password": "admin"}'

 

I see my notebook called JDBC

 

Notebook.jpg

 

If I want to execute the following code 

select * from pacs2.pacs2.campaign limit 10

 

I get the following error

 

An error occurred while calling z:java.sql.DriverManager.getConnection. : java.sql.SQLException: No suitable driver found for jdbc:drill:zk=r2c00.pmd.local:2181,r2c01.pmd.local:2181,r2c02.pmd.local:2181/drill/pacluster;schema=pacs2 at java.sql.DriverManager.getConnection(DriverManager.java:689) at java.sql.DriverManager.getConnection(DriverManager.java:247) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at py4j.reflection.MethodInvoker.invoke(MethodInvoker.java:231) at py4j.reflection.ReflectionEngine.invoke(ReflectionEngine.java:379) at py4j.Gateway.invoke(Gateway.java:259) at py4j.commands.AbstractCommand.invokeMethod(AbstractCommand.java:133) at py4j.commands.CallCommand.execute(CallCommand.java:79) at py4j.GatewayConnection.run(GatewayConnection.java:207) at java.lang.Thread.run(Thread.java:745)

 

Obviously HUE is not possible to find the driver. Surprisingly if I try to connect to the database via SQuirrel SQL it's no problem.

 

 

So my key question is where I have to locate the JDBC jar file? Is there a specific location for this file?

 

I am using HUE 3.11 and Cloudera CDH 5.9.0.

 

Thanks for all your help!

Peter