实战 - Spring boot 整合Hive :java.lang.NoSuchMethodError

使用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.hivegroupId>
            <artifactId>hive-jdbcartifactId>
            <version>1.2.1version>
            <exclusions>
                <exclusion>
                    <groupId>org.eclipse.jetty.aggregategroupId>
                    <artifactId>jetty-allartifactId>
                exclusion>
                <exclusion>
                    <groupId>org.apache.hivegroupId>
                    <artifactId>hive-shimsartifactId>
                exclusion>
            exclusions>
        dependency>

你可能感兴趣的:(Hadoop生态圈,Spring,Boot)