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

dubbo(2.5.3)添加自定义filter,jar包方式启动报错

异常如下

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.alibaba.dubbo.config.ProviderConfig': Error setting property values; nested xception is org.springframework.beans.PropertyBatchUpdateException; nested PropertyAccessExceptions (1) are: PropertyAccessException 1: org.springframework.beans.MethodInvocationException: Property 'filter' threw exception; nested exception is java.lang.IllegalStateException: No such ext nsion dubboProviderFilter for filter/com.alibaba.dubbo.rpc.Filter at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1639) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1354) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:572) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:495) at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:317) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:315) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeansOfType(DefaultListableBeanFactory.java:514) at org.springframework.context.support.AbstractApplicationContext.getBeansOfType(AbstractApplicationContext.java:1206) at org.springframework.beans.factory.BeanFactoryUtils.beansOfTypeIncludingAncestors(BeanFactoryUtils.java:327) at com.alibaba.dubbo.config.spring.ServiceBean.afterPropertiesSet(ServiceBean.java:123) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1758) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1695) ... 12 more

1、com.alibaba.dubbo.rpc.Filter文件已放在 resources/META-INF/dubbo下,同时也试了resources/META-INF/dubbo/internal路径

2、idea中启动main类没有问题,打成jar包启动报以上异常,已被折磨了两天了

3、跪求解决方案

原提问者GitHub用户malversation

展开
收起
大圣东游 2023-05-11 20:06:32 267 0
1 条回答
写回答
取消 提交回答
  • 检查一下是否是打包方式的问题。解压你的jar包,看里面的内容是否符合你的预期

    原回答者GitHub用户horizonzy

    2023-05-12 11:09:16
    赞同 展开评论 打赏

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

相关电子书

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