Does the parameter type of the setter match the return type of the getter?
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?的更多相关文章
- 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 ...
- [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 ...
- org.springframework.dao.InvalidDataAccessApiUsageException: Parameter value [41] did not match expected type [java.lang.Integer (n/a)];
题记:以前记录过一些自己遇到的BUG,这个行为,让我一看报错的提示信息就能定位到问题的所在,后来记得比较多了,好多是重复性的再加上比较忙就没有详细的记录了,今天的工作量比较小,就顺便记录一下,以便以后 ...
- 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 ...
- Generic method return type
Here's the Animal class: public class Animal{ private Map<String,Animal> friends =new HashMap& ...
- 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 ...
- 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 ...
- 使用JFinal的第一个项目出现的问题(The return type is incompatible with JspSourceDependent.getDependants())
四月 08, 2016 4:35:34 下午 org.apache.catalina.core.ApplicationDispatcher invoke严重: Servlet.service() fo ...
- 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 ...
随机推荐
- IE11不支持Selenium 2.0的解决方法
题前话(Pre-words) 希望使用Selenium 2.0的人看到这篇文章能够收藏此文,以后遇到该问题,再也不用花费多余的时间进行research了!本文就是对网上所有千奇百怪各种各样的searc ...
- buildroot 制作的文件系统烧入到nand中打开设备没有权限
利用buildroot 制作的文件系统,启动系统加载文件系统后出现打开设备Permission denied 解决方法记录. 这应该是制作文件系统的机制问题,暂时没有搞清楚为什么. 解决方式: 给生成 ...
- Android—— 线程 thread 两种实现方法!(转)
原文地址:http://blog.csdn.net/boyupeng/article/details/6208072 这篇文章中有三点需要提前说明一下, 一: 在android中有两种实现线程thre ...
- java中静态方法的使用
JAVA中使用静态方法 编程时我们心里一定要清楚静态方法和类的非静态方法方法的区别: 最根本区别从编译角度来说吧: 1) 静态(static)方法是编译时直接加载加载到内存中(离cpu最近的一块内存区 ...
- 信号值大于-75dBm时
dBm是一个表示功率绝对值的值,是以1mw为0dbm,公式dbm=10×lg(毫瓦数/1).所以,为负值 这个值越大,表示信号越好,如-70dbm信号比-90dbm好 信号值大于-75dBm时,说明 ...
- MongoDB自动删除过期数据--TTL索引
前序: 由于公司业务需求,对于3个月前的过期数据需要进行删除动作,以释放空间和方便维护 本来想的是使用crontab写个脚本定时执行,但是看到Mongo本身就有自动删除过期数据的功能,所以还是用一 ...
- php BC高精确度函数库
#两个高精度数比较 #int bccomp ( string $left_operand , string $right_operand [, int $scale ] ) #$left=$right ...
- 专题实验 Statspack & 9大动态视图
statspack 是一个DBA经常用的调优工具, 它的主要作用是, 针对数据库的不同时刻做快照, 然后来比对快照之前的差异和瓶颈, 快照可以是手动的也可以是自动的, 从 oracle 10g开始, ...
- js对数字的校验
//-----------------------------------------------函数(1):允许输入正数和负数的表达式-------------------------------- ...
- Ubuntu之音效调节
sudo add-apt-repository ppa:nilarimogard/webupd8 sudo apt-get update sudo apt-get install pulseaudio ...