Note - JiaoJianbo/dubbo-zookeeper GitHub Wiki

本地构建这些项目的时候,有几个地方花费了比较多的时间,大概记录一下,以防再次入坑。

  1. 最新的Dubbo(2.7.0-SNAPSHOT)在Spring配置文件中的namespace跟以前的不一样了。我做的时候是照着最新的官网上的程序示例,但是pom中引入的是dubbo 2.6.1。在运行的时候一直报namespace相关的错误,最后跟以前的程序对比了一下,发现了问题。

    最新的2.7.0-SNAPSHOT中已经使用Apache的域名,

    <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">
    

    以前版本中用的是Alibaba的域名,

    <beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xmlns:dubbo="http://code.alibabatech.com/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://code.alibabatech.com/schema/dubbo 
        http://code.alibabatech.com/schema/dubbo/dubbo.xsd">
    
  2. 由于本地网络的原因,maven仓库中很多jar包没有完整的下载。如下图显示, sha1-in-progress

    jar包其实已经下载下来了,sha1校验文件没有完全下载,但是在eclipse中看到jar包可以正常引入,只是使用过程中仍然会报ClassNotFoundException的错误信息。只好手动删除仓库中的这个包(本例中就是jmockit 1.3.3的包),让maven重新下载一下就好了。