Dubbo Unable to locate Spring NamespaceHandler for XML schema namespace

错误信息如下:  

我用的dubbo 版本为: 2.6.1 

Exception in thread "main" org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Failed to import bean definitions from URL location [classpath:minipro-consumer.xml]

Offending resource: class path resource [applicationContext.xml]; nested exception is org.springframework.beans.factory.parsing.BeanDefinitionParsingException: Configuration problem: Unable to locate Spring NamespaceHandler for XML schema namespace [http://dubbo.apache.org/schema/dubbo]

Offending resource: class path resource [minipro-consumer.xml]


minipro-consumer.xml 内容如下:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
       xmlns:dubbo="http://dubbo.apache.org/schema/dubbo"
       xmlns="http://www.springframework.org/schema/beans"
       xsi:schemaLocation="http://www.springframework.org/schema/beans 
       http://www.springframework.org/schema/beans/spring-beans-4.3.xsd
       http://dubbo.apache.org/schema/dubbo 
       http://dubbo.apache.org/schema/dubbo/dubbo.xsd">
    <!-- consumer's application name, used for tracing dependency relationship (not a matching criterion),
    don't set it same as provider -->
    <dubbo:application name="minipro-consumer"/>

    <!-- use multicast registry center to discover service -->
    <!-- <dubbo:registry address="multicast://224.5.6.7:1234"/> -->
    
    <!-- 使用zookeeper注册中心暴露服务地址 -->
    <dubbo:registry address="zookeeper://192.168.1.103:2181"/>
    
    <!-- 用dubbo协议在20880端口暴露服务 -->
    <dubbo:protocol name="dubbo" port="20880"/>

    <!-- generate proxy for the remote service, then demoService can be used in the same way as the
    local regular interface -->
    <dubbo:reference id="userService" check="false" interface="com.junlenet.soa.user.api.service.IUserService"/>

</beans>

问题在于: dubbo-config-spring-2.6.1.jar --> META-INF-->spring.handlers 中的配置还是之前的域名 code.alibabatech.com , 而现在在github上下载的dubbo 代码里面却是: dubbo.apache.org 被坑了吧..... 偷笑偷笑偷笑






猜你喜欢

转载自blog.csdn.net/huweijun_2012/article/details/80239803