Spring boot 整合hive-jdbc导致无法启动的问题

2022-12-07,,,,

使用Spring boot整合Hive,在启动Spring boot项目时,报出异常:

java.lang.NoSuchMethodError: org.eclipse.jetty.servlet.ServletMapping.setDefault(Z)V

经过排查,是maven的包冲突引起的,具体做法,排除:jetty-all、hive-shims依赖包。对应的pom配置如下:

    <dependency>
<groupId>org.apache.hive</groupId>
<artifactId>hive-jdbc</artifactId>
<version>1.2.</version>
<exclusions>
<exclusion>
<groupId>org.eclipse.jetty.aggregate</groupId>
<artifactId>jetty-all</artifactId>
</exclusion>
<exclusion>
<groupId>org.apache.hive</groupId>
<artifactId>hive-shims</artifactId>
</exclusion>
</exclusions>
</dependency>

Spring boot 整合hive-jdbc导致无法启动的问题的相关教程结束。

《Spring boot 整合hive-jdbc导致无法启动的问题.doc》

下载本文的Word格式文档,以方便收藏与打印。