Dubbo 管理控制台启动报错
Posted wangyunzhong123
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了Dubbo 管理控制台启动报错相关的知识,希望对你有一定的参考价值。
参考:
安装Dubbo管理控制台
2.5.4-SNAPSHOT dubbo admin error
下载dubbo-admin-2.5.4.war
初次使用dubbo管理控制台,启动tomcat后,访问url报错,查看tomcat启动日志,发现以下错误:
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)
查看github相关的issue,有两种解决办法:
1. 更换jdk8
dubbo-admin-2.5.4不支持jdk8,最高支持到jdk1.7
此方法最为方便。
2. 升级用到的spring包
原先的war包中lib包的内容:
更改后的内容:
3.1.4的包可以自行下载,或者在本地repository中拷贝。
3. 小技巧
其他相关的搭建管理台的教程都说到一点,删除tomcat目录下webapps目录下ROOT目录中的全部内容,把此war包解压出来的内容全部拷贝至空的ROOT目录中去。因为管理台界面中有点按钮是按照 / 的方式访问,不那样做的话对页面友好有一定影响。
以上是关于Dubbo 管理控制台启动报错的主要内容,如果未能解决你的问题,请参考以下文章
dubbo-monitor安装监控中心,管理控制台安装网页一直访问不到,解决bug的方式记录
网上下载的dubbo-admin控制台程序启动报错Bean property 'URIType' is not writable