开发者社区 > 云原生 > 正文

DUBBO 2.7.12 使用Java -jar 命令启动, 自定义拦截器报错,但使用IDEA启动是

2021-11-12 22:34:12.069ERROR[ [33m [0;39m, [32m [0;39m, [34m [0;39m ][][][] o.s.boot.SpringApplication.reportFailure:826 - Application run failed java.lang.IllegalStateException: No such extension org.apache.dubbo.rpc.Filter by name providerTraceFilter, no related exception was found, please check whether related SPI module is missing. at org.apache.dubbo.common.extension.ExtensionLoader.findException(ExtensionLoader.java:647) at org.apache.dubbo.common.extension.ExtensionLoader.createExtension(ExtensionLoader.java:654) at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:443) at org.apache.dubbo.common.extension.ExtensionLoader.getExtension(ExtensionLoader.java:427) at org.apache.dubbo.common.extension.ExtensionLoader.getActivateExtension(ExtensionLoader.java:318) at org.apache.dubbo.common.extension.ExtensionLoader.getActivateExtension(ExtensionLoader.java:259) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.buildInvokerChain(ProtocolFilterWrapper.java:53) at org.apache.dubbo.rpc.protocol.ProtocolFilterWrapper.export(ProtocolFilterWrapper.java:75) at org.apache.dubbo.qos.protocol.QosProtocolWrapper.export(QosProtocolWrapper.java:66) at org.apache.dubbo.rpc.Protocol$Adaptive.export(Protocol$Adaptive.java) at org.apache.dubbo.config.ServiceConfig.exportLocal(ServiceConfig.java:580) at org.apache.dubbo.config.ServiceConfig.doExportUrlsFor1Protocol(ServiceConfig.java:512) at org.apache.dubbo.config.ServiceConfig.doExportUrls(ServiceConfig.java:371) at org.apache.dubbo.config.ServiceConfig.doExport(ServiceConfig.java:346) at org.apache.dubbo.config.ServiceConfig.export(ServiceConfig.java:240) at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportService(DubboBootstrap.java:1089) at org.apache.dubbo.config.bootstrap.DubboBootstrap.lambda$exportServices$14(DubboBootstrap.java:1076) at java.util.HashMap$Values.forEach(HashMap.java:983) at org.apache.dubbo.config.bootstrap.DubboBootstrap.exportServices(DubboBootstrap.java:1060) at org.apache.dubbo.config.bootstrap.DubboBootstrap.start(DubboBootstrap.java:885) at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onContextRefreshedEvent(DubboBootstrapApplicationListener.java:70) at org.apache.dubbo.config.spring.context.DubboBootstrapApplicationListener.onApplicationContextEvent(DubboBootstrapApplicationListener.java:63) at com.alibaba.spring.context.OnceApplicationContextEventListener.onApplicationEvent(OnceApplicationContextEventListener.java:52) 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:403) at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:360) at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:897) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.finishRefresh(ServletWebServerApplicationContext.java:162) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:553) at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:141) at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:747) at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) at org.springframework.boot.SpringApplication.run(SpringApplication.java:1215) at com.shangjietech.ServerServiceCodeCheck.main(ServerServiceCodeCheck.java:16) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) at java.lang.reflect.Method.invoke(Method.java:498) at org.springframework.boot.loader.MainMethodRunner.run(MainMethodRunner.java:48) at org.springframework.boot.loader.Launcher.launch(Launcher.java:87) at org.springframework.boot.loader.Launcher.launch(Launcher.java:51) at org.springframework.boot.loader.JarLauncher.main(JarLauncher.java:52) 2021-11-12 22:34:12.071WARN [ [33m [0;39m, [32m [0;39m, [34m [0;39m ][][][] c.a.n.c.http.HttpClientBeanHolder.shutdown:108 - [HttpClientBeanHolder] Start destroying common HttpClient 2021-11-12 22:34:12.071WARN [ [33m [0;39m, [32m [0;39m, [34m [0;39m ][][][] c.a.nacos.common.notify.NotifyCenter.shutdown:145 - [NotifyCenter] Start destroying Publisher 2021-11-12 22:34:12.071WARN [ [33m [0;39m, [32m [0;39m, [34m [0;39m ][][][] c.a.nacos.common.notify.NotifyCenter.shutdown:162 - [NotifyCenter] Destruction of the end 2021-11-12 22:34:12.072WARN [ [33m [0;39m, [32m [0;39m, [34m [0;39m ][][][] c.a.n.c.http.HttpClientBeanHolder.shutdown:114 - [HttpClientBeanHolder] Destruction of the end

打成的jar包我检查过, META-INF/dubbo/internal/org.apache.dubbo.rpc.filter 文件是存在的。

原提问者GitHub用户bykgh

展开
收起
大圣东游 2023-05-11 19:17:20 254 0
1 条回答
写回答
取消 提交回答
  • jar包启动报错问题原因找到了:META-INF/dubbo/internal/org.apache.dubbo.rpc.filter,最后 Filter应该大写,应该是org.apache.dubbo.rpc.Filter,但是直接用IDEA开发工具能正常启动原因还不知道……

    原回答者GitHub用户bykgh

    2023-05-12 11:06:44
    赞同 展开评论 打赏

阿里云拥有国内全面的云原生产品技术以及大规模的云原生应用实践,通过全面容器化、核心技术互联网化、应用 Serverless 化三大范式,助力制造业企业高效上云,实现系统稳定、应用敏捷智能。拥抱云原生,让创新无处不在。

相关电子书

更多
Dubbo开源现状与2.7规划 立即下载
Dubbo分布式服务治理实战 立即下载
《Dubbo 3.0 前瞻》 立即下载