使用Spring boot整合Hive,在啟動Spring boot項目時,報錯


使用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.1</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>



報錯2:
LocalHiveClientFactory required a bean of type 'org.springframework.data.hadoop.hive.HiveClientFactory' that could not be found.





免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM