'insert hive query giving class not found issue

I'm running hive queries using spark-sql on terminal.

In my process, I'm creating new table from existing table. But while creating table, I'm calling spark java jar on one of the field of existing table to transform value and then loading into new hive table.

If I just select my hive table with spark java jar, I'm getting transformed data, but when I'm inserting into new hive table with transformed data from select statement, its giving below error

ERROR TaskResultGetter: Could not deserialize TaskEndReason: ClassNotFound with classloader org.apache.spark.util.MutableURLClassLoader

Have added jars too

Add jar jarPath

any suggestion, why its happening ?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source