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目录中去。因为管理台界面中有点按钮是按照 / 的方式访问,不那样做的话对页面友好有一定影响。

你可能感兴趣的:(http服务器,RPC)