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.

 

 

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

解决办法:

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

<dependency>
<groupId>org.apache.spark</groupId>
<artifactId>spark-hive_2.11</artifactId>
<version>${spark.version}</version>
<!--<scope>provided</scope>-->
</dependency>
 
添加进去,等依赖全导进去以后,在执行程序就好使了

 

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

 

 


————————————————
版权声明:本文为CSDN博主「one111a」的原创文章,遵循CC 4.0 BY-SA版权协议,转载请附上原文出处链接及本声明。
原文链接:https://blog.csdn.net/one111a/article/details/100020458

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

上一篇:docker指令


下一篇:BUU Crypto-RSARSA