springboot整合的dubbo,启动时报错,No such extension org.apache.dubbo.rpc.Protocol,意思就是说没有这样的协议,应检查配置文件中的协议名称是否是dubbo协议的。
java.lang.IllegalStateException: No such extension org.apache.dubbo.rpc.Protocol by name student, no related exception was found, please check whether related SPI module is missing.
at org.apache.dubbo.***mon.extension.ExtensionLoader.findException(ExtensionLoader.java:649) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.***mon.extension.ExtensionLoader.createExtension(ExtensionLoader.java:656) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.***mon.extension.ExtensionLoader.getExtension(ExtensionLoader.java:445) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.***mon.extension.ExtensionLoader.getExtension(ExtensionLoader.java:429) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.ServiceConfig.findConfigedPorts(ServiceConfig.java:676) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:470) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:345) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:320) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:244) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportService(DubboBootstrap.java:1099) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$14(DubboBootstrap.java:1086) ~[dubbo-2.7.13.jar:2.7.13]
at java.util.HashMap$Values.forEach(HashMap.java:981) ~[na:1.8.0_192]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1070) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:886) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:70) ~[dubbo-2.7.13.jar:2.7.13]
at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:63) ~[dubbo-2.7.13.jar:2.7.13]
at ***.alibaba.spring.context.OnceApplicationContextEventListener.onApplicationEvent(OnceApplicationContextEventListener.java:52) ~[spring-context-support-1.0.11.jar:na]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.23.jar:5.3.23]
at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.13.jar:2.6.13]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:745) [spring-boot-2.6.13.jar:2.6.13]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:420) [spring-boot-2.6.13.jar:2.6.13]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:307) [spring-boot-2.6.13.jar:2.6.13]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1317) [spring-boot-2.6.13.jar:2.6.13]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1306) [spring-boot-2.6.13.jar:2.6.13]
at ***.hdx.student.biz.HdxStudentBizApplication.main(HdxStudentBizApplication.java:25) [classes/:na]
日志提示DUBBO没有这样的协议,所以检查配置文件。
解决办法
修改dubbo.protocol.name的值为dubbo协议即可
dubbo.protocol.name=dubbo