开发者社区 > 云原生 > 中间件 > 正文

大家有遇到关于Spring Cloud Alibaba的问题吗?

Caused by: java.lang.reflect.UndeclaredThrowableException: Failed to invoke event listener method
HandlerMethod details:
Bean [com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationAutoConfiguration]
Method [public void com.alibaba.cloud.dubbo.autoconfigure.DubboServiceRegistrationAutoConfiguration.onDubboBootstrapStarted(com.alibaba.cloud.dubbo.bootstrap.event.DubboBootstrapStartedEvent)]
Resolved arguments:
[0] [type=com.alibaba.cloud.dubbo.bootstrap.event.DubboBootstrapStartedEvent] [value=com.alibaba.cloud.dubbo.bootstrap.event.DubboBootstrapStartedEvent[source=com.alibaba.cloud.dubbo.bootstrap.DubboBootstrapWrapper@5667dd90]]

at org.springframework.context.event.ApplicationListenerMethodAdapter.doInvoke(ApplicationListenerMethodAdapter.java:322)
at org.springframework.context.event.ApplicationListenerMethodAdapter.processEvent(ApplicationListenerMethodAdapter.java:190)
at org.springframework.context.event.ApplicationListenerMethodAdapter.onApplicationEvent(ApplicationListenerMethodAdapter.java:153)
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172)
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165)
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404)
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361)
at com.alibaba.cloud.dubbo.bootstrap.DubboBootstrapStartCommandLineRunner.run(DubboBootstrapStartCommandLineRunner.java:46)
at org.springframework.boot.SpringApplication.callRunner(SpringApplication.java:795)
... 5 common frames omitted
Caused by: java.lang.AbstractMethodError: Receiver class org.apache.dubbo.registry.client.migration.MigrationRuleListener does not define or inherit an implementation of the resolved method 'abstract void onRefer(org.apache.dubbo.registry.integration.RegistryProtocol, org.apache.dubbo.rpc.Invoker)' of interface org.apache.dubbo.registry.integration.RegistryProtocolListener.
at org.apache.dubbo.registry.integration.RegistryProtocol.doRefer(RegistryProtocol.java:479)
at org.apache.dubbo.registry.integration.RegistryProtocol.refer(RegistryProtocol.java:454)
at org.apache.dubbo.rpc.protocol.ProtocolListenerWrapper.refer(ProtocolListenerWrapper.java:72)
at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.refer(ProtocolFilterWrapper.java:161)
at org.apache.dubbo.qos.protocol.QosProtocolWrapper.refer(QosProtocolWrapper.java:73)
at org.apache.dubbo.rpc.Protocol$Adaptive.refer(Protocol$Adaptive.java)
at org.apache.dubbo.config.ReferenceConfig.createProxy(ReferenceConfig.java:367)
at org.apache.dubbo.config.ReferenceConfig.init(ReferenceConfig.java:305)
at org.apache.dubbo.config.ReferenceConfig.get(ReferenceConfig.java:205)大家有遇到这样的问题吗?

展开
收起
林间雨 2023-11-14 13:26:52 98 0
1 条回答
写回答
取消 提交回答
  • 这个问题是由于在Spring Cloud Alibaba中,Dubbo服务注册时遇到了方法调用异常。具体来说,是在调用onRefer方法时出现了问题。这个错误可能是由于org.apache.dubbo.registry.client.migration.MigrationRuleListener类没有定义或继承onRefer方法的实现。

    要解决这个问题,你需要检查org.apache.dubbo.registry.client.migration.MigrationRuleListener类,确保它实现了org.apache.dubbo.registry.integration.RegistryProtocolListener接口中的onRefer方法。如果没有实现,你需要添加相应的方法实现。

    2023-11-30 13:37:43
    赞同 展开评论 打赏

为企业提供高效、稳定、易扩展的中间件产品。

相关电子书

更多
workshop专场-微服务专场-开发者动手实践营-微服务-Spring Cloud Alibaba 微服务全家桶体验 立即下载
云栖社区特邀专家徐雷Java Spring Boot开发实战系列课程(第20讲):经典面试题与阿里等名企内部招聘求职面试技巧 立即下载
微服务架构模式与原理Spring Cloud开发实战 立即下载

相关实验场景

更多