JDK 1.8, dubbo-admin版本是2.5.4-SNAPSHOT,tomcat8.5启动,报错:

ERROR context.ContextLoader - Context initialization failed
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'uriBrokerService': Cannot create inner bean '(inner bean)' of type [com.alibaba.citrus.service.uribroker.impl.URIBrokerServiceImpl$URIBrokerInfo] while setting bean property 'brokers' with key [0]; nested excepti
on is org.springframework.beans.factory.BeanCreationException: Error creating bean with name '(inner bean)#25': Cannot create inner bean 'server' of type [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker] while setting constructor argument; nested exception is org.springframework.beans.fact
ory.BeanCreationException: Error creating bean with name 'server': Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyException: Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: Bean property 'URIType'
is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:230)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122)
at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedList(BeanDefinitionValueResolver.java:287)

解决办法:
  1、webx的依赖改为3.1.6版;

<dependency>
<groupId>com.alibaba.citrus</groupId>
<artifactId>citrus-webx-all</artifactId>
<version>3.1.6</version>
</dependency>

  2、添加velocity的依赖,我用了1.7;

<dependency>
<groupId>org.apache.velocity</groupId>
<artifactId>velocity</artifactId>
<version>1.7</version>
</dependency>

  3、对依赖项dubbo添加exclusion,避免引入旧spring  

<dependency>
<groupId>com.alibaba</groupId>
<artifactId>dubbo</artifactId>
<version>${project.parent.version}</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
</exclusion>
</exclusions>
</dependency>

  4、webx已有spring 3以上的依赖,因此注释掉dubbo-admin里面的spring依赖

<!--<dependency>-->
<!--<groupId>org.springframework</groupId>-->
<!--<artifactId>spring</artifactId>-->
<!--</dependency>-->

  确定war包解压后lib目录没有spring 3 以下的依赖就行。然后运行正常了。

  解决方式来源于:https://github.com/alibaba/dubbo/issues/50   stirp网友

Does the parameter type of the setter match the return type of the getter?的更多相关文章

  1. Bean property ‘mapperHelper’ is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?

    spring boot 报错: Caused by: org.springframework.beans.NotWritablePropertyException: Invalid property ...

  2. [TypeScript] Infer the Return Type of a Generic Function Type Parameter

    When working with conditionals types, within the “extends” expression, we can use the “infer” keywor ...

  3. org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integer (n/a)];

    题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后 ...

  4. nested exception is java.lang.IllegalArgumentException: warning no match for this type name: res [Xlint:invalidAbsoluteTypeName]

    注:内有单词(sping)写错,请忽略,不影响程序运行 运行时报错: Exception in thread "main" org.springframework.beans.fa ...

  5. Generic method return type

    Here's the Animal class: public class Animal{ private Map<String,Animal> friends =new HashMap& ...

  6. c++11: trailing return type in functions(函数返回类型后置)

    In C++03, the return type of a function template cannot be generalized if the return type relies on ...

  7. Mapper method 'com.xxxx.other.dao.MyDao.getNo attempted to return null from a method with a primitive return type (int)

    使用myBatis调用存储过程的返回值,提示错误信息: org.apache.ibatis.binding.BindingException: Mapper method 'com.xxxx.othe ...

  8. 使用JFinal的第一个项目出现的问题(The return type is incompatible with JspSourceDependent.getDependants())

    四月 08, 2016 4:35:34 下午 org.apache.catalina.core.ApplicationDispatcher invoke严重: Servlet.service() fo ...

  9. java-No exception of type ConfigurationException can be thrown; an exception type must be a subclass of Throwable

    功能:读配置文件 java菜鸟:导入工程在报名处就开始报错,第一次遇到 import org.apache.commons.lang3.StringUtils; import org.apache.c ...

随机推荐

  1. Python IDLE快捷键【转载合集】

    转载自:http://www.douban.com/note/212321426/ 编辑状态时:Ctrl + [ .Ctrl + ] 缩进代码Alt+3 Alt+4 注释.取消注释代码行Alt+5 A ...

  2. SharePoint自动化系列——通过Coded UI录制脚本自动化创建SharePoint Designer Reusable Workflow

    Coded UI非常好,我开始还在想,怎么样能让一个通过SharePoint Designer创建的Workflow publish三百五十次?想不到一个好的方法,也不知道SharePoint Des ...

  3. Linux GPIO控制方法

    Linux GPIO控制方法 kernel version 4.4.12 在文件系统层: 1. 进入 /sys/class/gpio/ 目录 2. 假设你想控制的GPIO0_29,步骤如下: 1. e ...

  4. Liunx 安装 Mysql 5.7

    #[安装 Mysql 5.7] # 00.系统目录说明# 安装文件下载目录:/data/software# Mysql目录安装位置:/usr/local/mysql# 数据库保存位置:/data/my ...

  5. 看板与Scrum:哪个更适合你的团队?

    敏捷是理想型指标和原则,看板和Scrum是帮助团队坚持敏捷原则并完成工作的基本框架.本文详细介绍了在Scrum和看板之间做出选择时要考虑的关键因素,以及如果我们无法做出决定时该怎么办. Scrum和看 ...

  6. JS下拉图片Demo3

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/ ...

  7. MySQL多表数据记录查询详解

    在实际应用中,经常需要实现在一个查询语句中显示多张表的数据,这就是所谓的多表数据记录连接查询,简称来年将诶查询. 在具体实现连接查询操作时,首先将两个或两个以上的表按照某个条件连接起来,然后再查询到所 ...

  8. MATLAB 安装使用libsvm详细步骤

    根据本文后面部分博友提出的在配置过程中出现的问题,其中需要特别强调的一点:整个过程,都是在 libsvm-3.12\matlab目录下操作的.如果这一点你忽视了,你不可能解决配置中报的Bug,即使重新 ...

  9. CSS3加载动画

    图1 通常我们都使用gif格式的图片或者使用Ajax来实现诸如这类的动态加载条,但是现在CSS3也可以完成,并且灵活性更大. 选1个例子看看怎么实现的吧: 效果图:   图2 代码: 使用1个名为'l ...

  10. div 点击展开

    <script type="text/javascript" src="http://libs.baidu.com/jquery/2.1.1/jquery.min. ...