首页 > 其他分享 >springboot连接hive无法启动

springboot连接hive无法启动

时间:2024-09-14 11:13:08浏览次数:1  
标签:java springboot boot springframework slf4j hive apache org 连接

  1 <?xml version="1.0" encoding="UTF-8"?>
  2 <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  3          xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
  4     <modelVersion>4.0.0</modelVersion>
  5     <parent>
  6         <groupId>org.springframework.boot</groupId>
  7         <artifactId>spring-boot-starter-parent</artifactId>
  8         <version>3.3.3</version>
  9         <relativePath/> <!-- lookup parent from repository -->
 10     </parent>
 11     <groupId>com.lian</groupId>
 12     <artifactId>springDemo2</artifactId>
 13     <version>0.0.1-SNAPSHOT</version>
 14     <name>springDemo2</name>
 15     <description>springDemo2</description>
 16 
 17     <url/>
 18     <licenses>
 19         <license/>
 20     </licenses>
 21     <developers>
 22         <developer/>
 23     </developers>
 24     <scm>
 25         <connection/>
 26         <developerConnection/>
 27         <tag/>
 28         <url/>
 29     </scm>
 30     <properties>
 31         <java.version>17</java.version>
 32     </properties>
 33     <dependencies>
 34 
 35         <!-- Hive JDBC with reload4j exclusion -->
 36         <dependency>
 37             <groupId>org.apache.hive</groupId>
 38             <artifactId>hive-jdbc</artifactId>
 39             <version>3.1.2</version>
 40             <exclusions>
 41                 <exclusion>
 42                     <groupId>org.slf4j</groupId>
 43                     <artifactId>slf4j-reload4j</artifactId>
 44                 </exclusion>
 45             </exclusions>
 46         </dependency>
 47 
 48         <!-- Hadoop Common -->
 49         <dependency>
 50             <groupId>org.apache.hadoop</groupId>
 51             <artifactId>hadoop-common</artifactId>
 52             <version>3.3.5</version>
 53             <exclusions>
 54                 <exclusion>
 55                     <groupId>org.slf4j</groupId>
 56                     <artifactId>slf4j-reload4j</artifactId>
 57                 </exclusion>
 58             </exclusions>
 59         </dependency>
 60 
 61         <!-- Spring Boot Starter Web -->
 62         <dependency>
 63             <groupId>org.springframework.boot</groupId>
 64             <artifactId>spring-boot-starter-web</artifactId>
 65             <!-- Ensure to exclude logback only if necessary -->
 66             <exclusions>
 67                 <exclusion>
 68                     <groupId>org.springframework.boot</groupId>
 69                     <artifactId>spring-boot-starter-logging</artifactId>
 70                 </exclusion>
 71             </exclusions>
 72         </dependency>
 73 
 74         <!-- MyBatis Spring Boot Starter -->
 75         <dependency>
 76             <groupId>org.mybatis.spring.boot</groupId>
 77             <artifactId>mybatis-spring-boot-starter</artifactId>
 78             <version>3.0.3</version>
 79             <exclusions>
 80                 <exclusion>
 81                     <groupId>org.springframework.boot</groupId>
 82                     <artifactId>spring-boot-starter-logging</artifactId>
 83                 </exclusion>
 84             </exclusions>
 85         </dependency>
 86 
 87         <!-- MySQL Connector -->
 88         <dependency>
 89             <groupId>com.mysql</groupId>
 90             <artifactId>mysql-connector-j</artifactId>
 91             <scope>runtime</scope>
 92         </dependency>
 93 
 94 
 95 
 96 
 97 
 98         <!-- Spring Boot Starter Test -->
 99         <dependency>
100             <groupId>org.springframework.boot</groupId>
101             <artifactId>spring-boot-starter-test</artifactId>
102             <scope>test</scope>
103         </dependency>
104 
105         <!-- MyBatis Spring Boot Starter Test -->
106         <dependency>
107             <groupId>org.mybatis.spring.boot</groupId>
108             <artifactId>mybatis-spring-boot-starter-test</artifactId>
109             <version>3.0.3</version>
110             <scope>test</scope>
111         </dependency>
112 
113 
114         <dependency>
115             <groupId>org.slf4j</groupId>
116             <artifactId>slf4j-api</artifactId>
117             <version>2.0.16</version>
118         </dependency>
119 
120         <dependency>
121             <groupId>ch.qos.logback</groupId>
122             <artifactId>logback-classic</artifactId>
123             <version>1.4.11</version> <!-- Logback 1.4.x 支持 SLF4J 2.x -->
124         </dependency>
125 
126 
127 
128     </dependencies>
129 
130 
131 
132     <build>
133         <plugins>
134 
135 
136             
137         </plugins>
138     </build>
139 
140 
141 </project>

修改之前的报错信息:大概就是两种日志发生了冲突

报错信息

SLF4J(W): Class path contains multiple SLF4J providers.
SLF4J(W): Found provider [org.slf4j.reload4j.Reload4jServiceProvider@60975100]
SLF4J(W): Found provider [ch.qos.logback.classic.spi.LogbackServiceProvider@1253e7cb]
SLF4J(W): See https://www.slf4j.org/codes.html#multiple_bindings for an explanation.
SLF4J(I): Actual provider is of type [org.slf4j.reload4j.Reload4jServiceProvider@60975100]
Exception in thread "main" java.lang.IllegalArgumentException: LoggerFactory is not a Logback LoggerContext but Logback is on the classpath. Either remove Logback or the competing implementation (class org.slf4j.reload4j.Reload4jLoggerFactory loaded from file:/D:/Maven/apache-maven-3.9.5/mvn_repo/org/slf4j/slf4j-reload4j/2.0.16/slf4j-reload4j-2.0.16.jar). If you are using WebLogic you will need to add 'org.slf4j' to prefer-application-packages in WEB-INF/weblogic.xml: org.slf4j.reload4j.Reload4jLoggerFactory
    at org.springframework.util.Assert.instanceCheckFailed(Assert.java:592)
    at org.springframework.util.Assert.isInstanceOf(Assert.java:511)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.getLoggerContext(LogbackLoggingSystem.java:403)
    at org.springframework.boot.logging.logback.LogbackLoggingSystem.beforeInitialize(LogbackLoggingSystem.java:128)
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationStartingEvent(LoggingApplicationListener.java:238)
    at org.springframework.boot.context.logging.LoggingApplicationListener.onApplicationEvent(LoggingApplicationListener.java:220)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:185)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:178)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:156)
    at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:138)
    at org.springframework.boot.context.event.EventPublishingRunListener.multicastInitialEvent(EventPublishingRunListener.java:136)
    at org.springframework.boot.context.event.EventPublishingRunListener.starting(EventPublishingRunListener.java:75)
    at org.springframework.boot.SpringApplicationRunListeners.lambda$starting$0(SpringApplicationRunListeners.java:54)
    at java.base/java.lang.Iterable.forEach(Iterable.java:75)
    at org.springframework.boot.SpringApplicationRunListeners.doWithListeners(SpringApplicationRunListeners.java:118)
    at org.springframework.boot.SpringApplicationRunListeners.starting(SpringApplicationRunListeners.java:54)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:327)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1363)
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1352)
    at com.lian.springdemo2.SpringDemo2Application.main(SpringDemo2Application.java:10)

修改之后

报错信息

2024-09-14T10:59:54.837+08:00  WARN 3192 --- [springDemo2] [           main] o.m.s.mapper.ClassPathMapperScanner      : No MyBatis mapper was found in '[com.lian.springdemo2]' package. Please check your configuration.
10:59:55.104 [main] ERROR org.springframework.boot.diagnostics.LoggingFailureAnalysisReporter - 

***************************
APPLICATION FAILED TO START
***************************

Description:

An attempt was made to call a method that does not exist. The attempt was made from the following location:

    org.apache.catalina.startup.Tomcat.<init>(Tomcat.java:161)

The following method did not exist:

    'void org.apache.tomcat.util.ExceptionUtils.preload()'

The calling method's class, org.apache.catalina.startup.Tomcat, was loaded from the following location:

    jar:file:/D:/Maven/apache-maven-3.9.5/mvn_repo/org/apache/tomcat/embed/tomcat-embed-core/10.1.28/tomcat-embed-core-10.1.28.jar!/org/apache/catalina/startup/Tomcat.class

The called method's class, org.apache.tomcat.util.ExceptionUtils, is available from the following locations:

    jar:file:/D:/Maven/apache-maven-3.9.5/mvn_repo/org/eclipse/jetty/jetty-runner/9.3.20.v20170531/jetty-runner-9.3.20.v20170531.jar!/org/apache/tomcat/util/ExceptionUtils.class
    jar:file:/D:/Maven/apache-maven-3.9.5/mvn_repo/org/apache/tomcat/embed/tomcat-embed-core/10.1.28/tomcat-embed-core-10.1.28.jar!/org/apache/tomcat/util/ExceptionUtils.class

The called method's class hierarchy was loaded from the following locations:

    org.apache.tomcat.util.ExceptionUtils: file:/D:/Maven/apache-maven-3.9.5/mvn_repo/org/eclipse/jetty/jetty-runner/9.3.20.v20170531/jetty-runner-9.3.20.v20170531.jar


Action:

Correct the classpath of your application so that it contains compatible versions of the classes org.apache.catalina.startup.Tomcat and org.apache.tomcat.util.ExceptionUtils


Process finished with exit code 1

 

标签:java,springboot,boot,springframework,slf4j,hive,apache,org,连接
From: https://www.cnblogs.com/lian369/p/18413587

相关文章

  • 基于springboot “xbar”小酒馆微信小程序-附源码05937
    摘 要本文旨在设计和实现基于SpringBoot的“xbar”小酒馆微信小程序,以适应互联网高速发展对传统餐饮服务带来的影响。该小程序采用线上点餐模式,通过充分利用互联网优势,解决顾客就餐过程中的各种问题,提高运营效率。“xbar”小酒馆微信小程序主要包含首页、点餐、订单和我的......
  • springboot+vue在线考试系统的设计与演示录像220239【程序+论文+开题】计算机毕业设计
    系统程序文件列表开题报告内容研究背景随着互联网技术的飞速发展,教育领域正经历着前所未有的变革。传统的考试方式,如纸质试卷考试,不仅效率低下、成本高昂,而且在组织、阅卷及反馈等环节上存在诸多不便。尤其是在大规模考试或远程教育中,这些问题尤为突出。因此,开发一种高效、......
  • 基于springboot智慧社区管理系统的设计与实现-附源码04191
    目 录1绪论1.1研究背景与意义1.2国内外研究现状1.3论文结构与章节安排2 系统分析2.1可行性分析2.1.1技术可行性分析2.1.2 经济可行性分析2.1.3法律可行性分析2.2系统需求分析2.3 系统用例分析2.4 系统流程分析2.4.1系统开发流程2.4.2......
  • springboot+vue知识文档共享系统【程序+论文+开题】计算机毕业设计
    系统程序文件列表开题报告内容研究背景在信息化高速发展的今天,知识已成为企业核心竞争力的重要组成部分。然而,随着企业规模的扩大和业务复杂度的增加,知识的有效管理和共享成为了一个亟待解决的问题。传统的文档管理方式往往存在查找困难、版本混乱、知识孤岛等问题,严重制约......
  • JST连接器:小型化电子连接的行业标准
    在现代电子设备中,连接器的选择对设备性能和可靠性具有重要影响。JST连接器作为全球广泛使用的一种连接器,以其小型化、高可靠性和多样化的产品系列,成为众多电子工程师的首选。本文将深入探讨JST连接器的类型及特点、应用领域及其在电子行业中的重要性。JST连接器的简介JST(JapanSold......
  • springboot+vue小区物业管理系统【程序+论文+开题】计算机毕业设计
    系统程序文件列表开题报告内容研究背景随着城市化进程的加速,住宅小区作为城市居民生活的重要载体,其管理效率与服务质量直接关系到居民的生活品质与社区和谐。传统的小区物业管理方式往往依赖于人工记录与纸质文档,不仅效率低下,且易出错,难以满足现代小区多元化、精细化的管理......
  • 基于springboot列星药膳管理系统的设计与实现-附源码05345
    摘 要身处互联网+时代,互联网无形中影响着人们的吃穿住行,人们享受着不出门便可购物的便利,网络购物在当今社会工作生活节奏飞快的今天备受欢迎,让人们购物不再受时间、地点的制约,高效快速。药膳作为一种传统的中医养生方式受到了广泛关注。然而,传统的药膳管理方式存在一些问题......
  • SpringBoot集成高德天气API获取天气数据
    一、前言现在我们的日常开发中获取天气信息已经成为一项很重要的功能,也是一些门户网站必不可少的展示。所以我们需要学习如何获取实时天气数据,我们利用SpringBoot集成高德天气API可以很方便的实现获取天气实时数据。二、前期准备1.账号申请天气文档:https://lbs.amap.com/api/webser......
  • 基于SpringBoot的在线拍卖系统[源码+论文]
    摘要随着社会的发展,社会的各行各业都在利用信息化时代的优势。计算机的优势和普及使得各种信息系统的开发成为必需。在线拍卖系统,主要的模块包括管理员;首页、个人中心、用户管理、商品类型管理、拍卖商品管理、历史竞拍管理、竞拍订单管理、留言板管理、系统管理,用户;首页、......
  • springboot-实现csv文件导出功能
    excle文件导出,会遇到一个65535行限制的问题,就是导出的数据行数超过65535行就会导出失败,这个是excle本生的限制,这种情况下通常将导出的格式改成csv这样就可以跨过这个限制,同时生成的csv文件用office打开浏览效果与打开excle没有区别可以完美替代。1、依赖(比导出excle还少两个依赖)......