hive-2.1.1报错Failed to start database 'metastore_db' with class loader sun.misc.Launcher$AppClassLoad

在安装Hive 2.1.1过程中遇到错误,具体表现为Failed to start database 'metastore_db',伴随着类加载器sun.misc.Launcher$AppClassLoader的相关问题。 HiveMetaException提示获取schema版本失败,需要解决这个问题以继续安装。

求帮忙,帮忙看看问题出在哪里:hive-2.1.1安装报错如下:

org.apache.hadoop.hive.metastore.HiveMetaException: Failed to get schema version

[root@master ~]# schematool -dbType mysql -initSchema
which: no hbase in (/root/anaconda2/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/root/bin:/root/package/jdk1.8.0_121/bin:/root/package/spark-2.1.0-bin-hadoop2.7/bin:/root/anaconda2/bin:/root/package/hadoop-2.7.3/sbin:/root/package/hadoop-2.7.3/bin:/root/package/zookeeper-3.4.9/bin:/root/package/zeppelin-0.7.0-bin-all/bin:/root/package/hive-2.1.1/bin)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/root/package/hive-2.1.1/lib/log4j-slf4j-impl-2.4.1.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/root/package/hadoop-2.7.3/share/hadoop/common/lib/slf4j-log4j12-1.7.10.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an e
11:59:26.630 [Thread-0] DEBUG org.springframework.boot.devtools.restart.classloader.RestartClassLoader - Created RestartClassLoader org.springframework.boot.devtools.restart.classloader.RestartClassLoader@6695a99b 2025-09-09 11:59:28.264 WARN 17840 --- [ restartedMain] o.s.b.c.config.ConfigDataEnvironment : Property 'spring.profiles' imported from location 'class path resource [bootstrap.yml]' is invalid and should be replaced with 'spring.config.activate.on-profile' [origin: class path resource [bootstrap.yml] - 19:12] 2025-09-09 11:59:28.267 INFO 17840 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable . ____ _ __ _ _ /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \ ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.7.18) 2025-09-09 11:59:34.380 WARN 17840 --- [ restartedMain] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[ifs-data-application] & group[ifs] 2025-09-09 11:59:37.416 WARN 17840 --- [ restartedMain] c.a.c.n.c.NacosPropertySourceBuilder : Ignore the empty nacos configuration and get it based on dataId[ifs-data-application.yaml] & group[ifs] 2025-09-09 11:59:37.416 INFO 17840 --- [ restartedMain] b.c.PropertySourceBootstrapConfiguration : Located property source: [BootstrapPropertySource {name='bootstrapProperties-ifs-data-application.yaml,ifs'}, BootstrapPropertySource {name='bootstrapProperties-ifs-data-application,ifs'}] 2025-09-09 11:59:37.434 INFO 17840 --- [ restartedMain] MaiTest : No active profile set, falling back to 1 default profile: "default" 2025-09-09 11:59:37.439 WARN 17840 --- [ restartedMain] o.s.b.c.config.ConfigDataEnvironment : Property 'spring.profiles' is invalid and should be replaced with 'spring.config.activate.on-profile' [origin: class path resource [bootstrap.yml] - 19:12] 2025-09-09 11:59:37.456 INFO 17840 --- [ restartedMain] MaiTest : Started MaiTest in 10.796 seconds (JVM running for 12.372) 2025-09-09 11:59:37.569 ERROR 17840 --- [ restartedMain] o.s.boot.SpringApplication : Application run failed java.lang.NoClassDefFoundError: org/apache/hive/service/rpc/thrift/TCLIService$Iface at org.apache.hive.jdbc.HiveDriver.connect(HiveDriver.java:107) ~[hive-jdbc-2.1.1-cdh6.3.2-cdh6.3.2.jar:2.1.1-cdh6.3.2] at java.sql.DriverManager.getConnection(DriverManager.java:664) ~[na:1.8.0_431] at java.sql.DriverManager.getConnection(DriverManager.java:247) ~[na:1.8.0_431] at MaiTest.run(MaiTest.java:42) [test-classes/:na] at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:765) ~[spring-boot-2.7.18.jar:2.7.18] at org.springframework.boot.SpringApplication.lambda$callRunners$2(SpringApplication.java:749) ~[spring-boot-2.7.18.jar:2.7.18] at java.util.stream.ForEachOps$ForEachOp$OfRef.accept(ForEachOps.java:184) ~[na:1.8.0_431] at java.util.stream.SortedOps$SizedRefSortingSink.end(SortedOps.java:352) ~[na:1.8.0_431] at java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:483) ~[na:1.8.0_431] at java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:472) ~[na:1.8.0_431] at java.util.stream.ForEachOps$ForEachOp.evaluateSequential(ForEachOps.java:151) ~[na:1.8.0_431] at java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(ForEachOps.java:174) ~[na:1.8.0_431] at java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234) ~[na:1.8.0_431] at java.util.stream.ReferencePipeline.forEach(ReferencePipeline.java:418) ~[na:1.8.0_431] at org.springframework.boot.SpringApplication.callRunners(SpringApplication.java:744) ~[spring-boot-2.7.18.jar:2.7.18] at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.7.18.jar:2.7.18] at MaiTest.main(MaiTest.java:31) [test-classes/:na] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_431] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[na:1.8.0_431] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[na:1.8.0_431] at java.lang.reflect.Method.invoke(Method.java:498) ~[na:1.8.0_431] at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:50) [spring-boot-devtools-2.7.18.jar:2.7.18] Caused by: java.lang.ClassNotFoundException: org.apache.hive.service.rpc.thrift.TCLIService$Iface at java.net.URLClassLoader.findClass(URLClassLoader.java:387) ~[na:1.8.0_431] at java.lang.ClassLoader.loadClass(ClassLoader.java:418) ~[na:1.8.0_431] at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:359) ~[na:1.8.0_431] at java.lang.ClassLoader.loadClass(ClassLoader.java:351) ~[na:1.8.0_431] ... 22 common frames omitted 2025-09-09 11:59:37.575 WARN 17840 --- [ Thread-6] c.a.n.common.http.HttpClientBeanHolder : [HttpClientBeanHolder] Start destroying common HttpClient 进程已结束,退出代码0
最新发布
09-10
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值