【Springboot+Dubbo】常见报错解决

java.lang.NoClassDefFoundError: org/apache/curator/RetryPolicy

在pom.xml中加上依赖

		<dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-framework</artifactId>
            <version>2.8.0</version>
        </dependency>
        <dependency>
            <groupId>org.apache.curator</groupId>
            <artifactId>curator-recipes</artifactId>
            <version>2.8.0</version>
    	</dependency>

nested exception is java.lang.IllegalStateException: No application config found or it’s not a valid config! Please add <dubbo:application name="…" /> to your spring config.

这里我的解决方法是把dubbo换成org.apache.dubbo,确保jdk版本为1.8
将application.properties内加入,注意!这里不是spring为前缀!

dubbo.server=true
dubbo.application.name=springboot-dubbo-provider
dubbo.registry.address=zookeeper://localhost:2181

org.apache.dubbo.rpc.RpcException: please check status of providers(disabled, not registered or in blacklist).

在Application上加上@DubboComponentScan注解

@SpringBootApplication
@DubboComponentScan
public class Application {

	public static void main(String[] args) {
		SpringApplication.run(Application.class, args);
	}

}

Opening socket connection to server kubernetes.docker.internal/127.0.0.1:2181. Will not attempt to authenticate using SASL (unknown error)

zookeeper服务未开启


Invocation of init method failed; nested exception is java.lang.ExceptionInInitial

将jdk版本与dubbo支持版本对应,一般java1.8


有一些错误将mvn clean一下就ok了

  • 1
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值