Mitigating JSON SerDe failures after migration

This topic provides a solution for issues with JSON SerDe functionality that can occur after migrating from older releases.

Condition

Users migrating from CDH or HDP to Cloudera who utilize the hive-catalog-core-3.1.3000[...] .jar for JSON SerDe functionality encounter a java.lang.ClassNotFoundException post-upgrade.

Cause

This issue is caused by the use of an outdated SerDe class. The JsonSerDe class was moved to Hive from HCatalog and its previous location in the hive-catalog-core jar is deprecated in Cloudera, leading to the ClassNotFoundException [HIVE-19211]

Soultion

ALTER TABLE <tbl_name> SET SERDE 'org.apache.hadoop.hive.serde2.JsonSerDe';
To resolve this issue, you must update the table to use the new JsonSerDe class. The recommended solution is to run the above command.