侧边栏壁纸
博主头像
落叶人生博主等级

走进秋风,寻找秋天的落叶

  • 累计撰写 130562 篇文章
  • 累计创建 28 个标签
  • 累计收到 9 条评论
标签搜索

目 录CONTENT

文章目录

dubbo-admin在jdk1.8下报错问题

2023-10-01 星期日 / 0 评论 / 0 点赞 / 53 阅读 / 3429 字

ERROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCr

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 exception 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.factory.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

ERROR context.ContextLoader - Context initialization failedorg.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 exception 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.factory.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?

查看源码:

set方法不很标准,导致高版本jdk(jre)不能支持,导致报错。

原因是从网上下载的一些别人编译好的war,旧版本书写的不规范导致在jdk1.8不行运行,我们自己下载新版本进行编译即可

也有人在github提出了这个issue,新版本官方已经解决。

解决方法:

1、更换服务器jdk版本。

2、修改运行dubbo-admin的tomcat默认jdk版本。

3、重新打包dubbo-admin。

主要说下第三种方法:

https://github.com/alibaba/dubbo.git

我下载的是是当时最新的版本,Latest commit 3945b83 on Apr 24

在dubbo的根目录执行编译安装

 mvn install -Dmaven.test.skip=true

 

广告 广告

评论区