dubbo2.5.1 版本 使用XML配置 报Caused by: java.lang.IllegalStateException: Duplicate monitor configs
dubbo2.5.1 版本 使用XML配置
报Caused by: java.lang.IllegalStateException: Duplicate monitor configs: <dubbo:monitor protocol="dubbo" id="com.alibaba.dubbo.config.MonitorConfig" />
XML 配置文件
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:dubbo="http://code.alibabatech.com/schema/dubbo"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://code.alibabatech.com/schema/dubbo http://code.alibabatech.com/schema/dubbo/dubbo.xsd ">
<dubbo:protocol name="hessian" port="${hessian.protocol.port}" threads="1000" />
<dubbo:registry protocol="${dubbo.registry.protocol}" address="${dubbo.registry.address}" />
<dubbo:protocol name="${dubbo.protocol.name}" port="${dubbo.protocol.port}"
threadpool="${dubbo.protocol.threadpool}" threads="${dubbo.protocol.threads}"
payload="${dubbo.protocol.payload:8388608}" accepts="${dubbo.protocol.accepts:0}"
dispatcher="${dubbo.protocol.dispatcher:all}" />
<dubbo:monitor protocol="${dubbo.monitor.protocol:registry}" />
<dubbo:application name="opcnet-icms-provider" />
<dubbo:provider executes="${dubbo:provider.executes}" actives="${dubbo:provider.actives}" />
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'mqAuditLogApi': Invocation of init method failed; nested exception is java.lang.IllegalStateException: Duplicate monitor configs: <dubbo:monitor protocol="dubbo" id="com.alibaba.dubbo.config.MonitorConfig" /> and <dubbo:monitor protocol="dubbo" id="com.alibaba.dubbo.config.MonitorConfig" />
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1572)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:539)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:476)
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:303)
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:230)
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:299)
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194)
at org.springframework.beans.factory.support.AbstractBeanFactory.isSingleton(AbstractBeanFactory.java:425)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doGetBeanNamesForType(DefaultListableBeanFactory.java:426)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.getBeanNamesForType(DefaultListableBeanFactory.java:402)
at org.springframework.context.support.AbstractApplicationContext.getBeanNamesForType(AbstractApplicationContext.java:1053)
at org.mule.config.spring.ServerNotificationManagerConfigurator.getMergedListeners(ServerNotificationManagerConfigurator.java:79)
at org.mule.config.spring.ServerNotificationManagerConfigurator.getObject(ServerNotificationManagerConfigurator.java:61)
at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:168)
... 18 more
Caused by: java.lang.IllegalStateException: Duplicate monitor configs: <dubbo:monitor protocol="dubbo" id="com.alibaba.dubbo.config.MonitorConfig" /> and <dubbo:monitor protocol="dubbo" id="com.alibaba.dubbo.config.MonitorConfig" />
at com.alibaba.dubbo.config.spring.ReferenceBean.afterPropertiesSet(ReferenceBean.java:157)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1631)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1568)
... 31 more
2018-11-09 16:08:54,923 [bboShutdownHook] INFO AbstractConfig - [DUBBO] Run shutdown hook now., dubbo version: 2.5.1, current host: 127.0.0.1
2018-11-09 16:08:54,925 [bboShutdownHook] INFO AbstractRegistryFactory - [DUBBO] Close all registries [], dubbo version: 2.5.1, current host: 127.0.0.1
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论