【nacos】启动nacos出现Error creating bean with name ‘instanceOperatorClientImpl‘ defined in URL错误

问题描述:
启动nacos时,显示无法创建instanceOperatorClientImpl
部分错误代码展示:

2023-07-13 22:17:59,176 WARN Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'instanceOperatorClientImpl' defined in URL 
[jar:file:/D:/nacos-server-2.2.0/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.2.0.jar!/com/alibaba/nacos/naming/core/InstanceOperatorClientImpl.class]: Unsatisfied dependency expressed through constructor parameter 1; 
nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'clientOperationServiceProxy' defined in URL [
jar:file:/D:/nacos-server-2.2.0/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.2.0.jar!/com/alibaba/nacos/naming/core/v2/service/ClientOperationServiceProxy.class]: Unsatisfied dependency expressed through constructor parameter 1; 
nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'persistentClientOperationServiceImpl' defined in URL
 [jar:file:/D:/nacos-server-2.2.0/nacos/target/nacos-server.jar!/BOOT-INF/lib/nacos-naming-2.2.0.jar!/com/alibaba/nacos/naming/core/v2/service/impl/PersistentClientOperationServiceImpl.class]: 
 Bean instantiation via constructor failed; 
 nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [com.alibaba.nacos.naming.core.v2.service.impl.PersistentClientOperationServiceImpl]: Constructor threw exception; nested exception is java.lang.ExceptionInInitializerError

问题分析:
网上的解决方法有:检查数据库配置、检查nacos存放路径是否有中文等,我都试了,但是不能解决我的问题。最后发现是因为电脑上装了两个JDK版本,JDK8是用压缩包的方式安装,在环境变量中配的也是JDK8,JDK11是用exe文件安装的,没有配置环境变量。
解决方法:
把环境变量中配置的JDK版本换成JDK11的目录就可以了。

  • 2
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 2
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值