I have deployed zeppelin 0.6 and configured hive under Jdbc interpreter.
Tried executing
%hive
show databases
Throws:
org.apache.hive.jdbc.HiveDriver class java.lang.ClassNotFoundException java.net.URLClassLoader.findClass(URLClassLoader.java:381) java.lang.ClassLoader.loadClass(ClassLoader.java:424) sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:331) java.lang.ClassLoader.loadClass(ClassLoader.java:357) java.lang.Class.forName0(Native Method) java.lang.Class.forName(Class.java:264) org.apache.zeppelin.jdbc.JDBCInterpreter.getConnection(JDBCInterpreter.java:220) org.apache.zeppelin.jdbc.JDBCInterpreter.getStatement(JDBCInterpreter.java:233) org.apache.zeppelin.jdbc.JDBCInterpreter.executeSql(JDBCInterpreter.java:292) org.apache.zeppelin.jdbc.JDBCInterpreter.interpret(JDBCInterpreter.java:398) org.apache.zeppelin.interpreter.LazyOpenInterpreter.interpret(LazyOpenInterpreter.java:94) org.apache.zeppelin.interpreter.remote.RemoteInterpreterServer$InterpretJob.jobRun(RemoteInterpreterServer.java:383) org.apache.zeppelin.scheduler.Job.run(Job.java:176) org.apache.zeppelin.scheduler.ParallelScheduler$JobRunner.run(ParallelScheduler.java:162) java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) java.util.concurrent.FutureTask.run(FutureTask.java:266) java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.access$201(ScheduledThreadPoolExecutor.java:180) java.util.concurrent.ScheduledThreadPoolExecutor$ScheduledFutureTask.run(ScheduledThreadPoolExecutor.java:293) java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) java.lang.Thread.run(Thread.java:745)
1) You could download just Hive JDBC driver instead of whole Hive jars set, for example, one from Cloudera:
http://www.cloudera.com/downloads/connectors/hive/jdbc/2-5-17.html
2)
Hive starting with 0.14 will have a standalone jar for JDBC part:
but until https://issues.apache.org/jira/browse/HIVE-9600 is resolved, you would need two more jars:
to put into classpath along with hive-jdbc-standalone.jar
I just ran into this issue this morning. I'm not sure if this is the recommended way to fix, but I downloaded the binary packages for Hive 1.2, and Hadoop 2.6.4. I then copied the following jars to
./interpreter/jdbc/
and reloaded zeppelin./bin/zeppelin-daemon.sh reload
cp ~/Dev/Hadoop/apache-hive-1.2.1-bin/lib/hive-jdbc-1.2.1-standalone.jar ./interpreter/jdbc/
cp ~/Dev/Hadoop/hadoop-2.6.4/share/hadoop/common/hadoop-common-2.6.4.jar ./interpreter/jdbc/
The top rated answer given here fixes the issue
However I have added the classpath of HADOOP_HOME to interpreter.sh to take the jar files in common
Below is the line which I have added to bin/interpreter.sh inside zeppelin