Unable to instantiate SparkSession with Hive support because Hive classes are not found.

写一个maven模块的时候出现了这样一个Exception:

Exception in thread "main" java.lang.IllegalArgumentException: Unable to instantiate SparkSession
 with Hive support because Hive classes are not found.

Unable to instantiate SparkSession with Hive support because Hive classes are not found._第1张图片

这是因为没有在这个模块的pom里边把hive支持加进来。

解决办法:

在工程模块中找到hive依赖,然后在执行的当前模块中添加hive依赖


    org.apache.spark
    spark-hive_2.11
    ${spark.version}
    

添加进去,等依赖全导进去以后,在执行程序就好使了

Unable to instantiate SparkSession with Hive support because Hive classes are not found._第2张图片

你可能感兴趣的:(Exception,collections)