dubbo2.5.1 版本 使用XML配置 报Caused by: java.lang.IllegalStateException: Duplicate monitor configs

飞雪007 发布于 2018/11/09 16:53
阅读 205
收藏 0

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

加载中
返回顶部
顶部