I am trying to read json data using Hive External table but I am getting Null pointer exception while using json serde..
Below is the table command and error:
hive> create external table json_tab
> (
> name string, age string, passion string
> )
> row format SERDE 'org.apache.hadoop.hive.contrib.serde2.JsonSerde' location '/home/pandi/hive_in';
FAILED: Execution Error, return code 1 from org.apache.hadoop.hive.ql.exec.DDLTask. java.lang.NullPointerException
I have added below jar as well: add jar /usr/local/apache-hive-2.1.1-bin/lib/hive-contrib-2.1.1.jar; add jar /usr/local/apache-hive-2.1.1-bin/lib/hive-json-serde.jar;
Please help.