Support Questions

Find answers, ask questions, and share your expertise

Can't create hive table using Zeppelin 0.7.2 sql / spark. Class not found

Hi, I'm trying to create hive table and query it using %sql.

I tried both: %spark and %sql, nothing helps.

Here is my DDL:

create external table MY_TABLE row format serde '' 
with serdeproperties ('serialization.class'='') 
stored as inputformat ''  
LOCATION 'hdfs://my/data'
Thrown exception:
MetaException(message:org.apache.hadoop.hive.serde2.SerDeException java.lang.ClassNotFoundException: Class not found)
It's confusing since spark paragraph works well with code
// bla-bla 
val rdd = sc.newAPIHadoopFile[AvroKey[ByteBuffer], NullWritable, 
AvroKeyInputFormat[ByteBuffer]]("hdfs://my/data"){bytes => ContainerProto.fromBytes(bytes)} 
Code executed and result produced. Why sql or spark paragraph doesn't see my 3rd party jars when I try to create hive table? Spark interpreter has proper configuration for required third party jars.

@Sergey Sheypak

I think the issue is in this line: with serdeproperties ('serialization.class'='')

You are trying to create a table with external SerDe class specified which is resulting in class not found error. The way to go around this is to add any external class that you are using in code in dependencies list in Spark interpreter

follow steps here to do this :

Once you do this, restart the interpreter and try to run query with %spark.sql

Hope this helps !!

For more background and information, read through these (This is resolved now) (This is resolved now too)