2.5.4-SNAPSHOT dubbo admin error
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)
切到 2.5.3 编译也是同样
原因之前找到了,是因为用了jdk8
你好,我在搭建dubbo-admin-2.5.4的时候也出现了类似情况,请问你是如何处理的,谢谢 系统环境:java version "1.8.0_11" 64-Bit,apache-tomcat-6.0.37, Caused by: 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.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:801) at org.springframework.beans.BeanWrapperImpl.setPropertyValue(BeanWrapperImpl.java:651) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:78) at org.springframework.beans.AbstractPropertyAccessor.setPropertyValues(AbstractPropertyAccessor.java:59) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1276) ... 61 more
各位,有用JDK8运行成功的吗?
解决 dubbo-admin jdk8 运行
<webx_version>3.0.8</webx_version>
升级为
<webx_version>3.1.6</webx_version>
dubbo-admin项目再加上velocity 依赖
webx_version 升级为3.1.6;还是不能运行,请问velocity 是哪个 velocity?
我也报这个错,升级也没用,用JDK6和JDK7跑报: java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView
JDK8报: 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?
当时解决是 将tomcat和对应的JDK部署起来就可以了
Date: Sun, 1 Mar 2015 18:05:52 -0800 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [dubbo] 2.5.4-SNAPSHOT dubbo admin error (#50)
我也报这个错,升级也没用,用JDK6和JDK7跑报:
java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()Ljava/util/concurrent/ConcurrentHashMap$KeySetView
JDK8报:
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?
— Reply to this email directly or view it on GitHub.
我使用的是JDK 1.8.0_05, dubbo-admin版本是2.5.4-SNAPSHOT,也遇到了一样的问题。解决方案如@ddatsh :
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 以下的依赖就行。然后运行正常了。
@stirp 按照你的改后,运行成功,感谢。
@stirp 谢谢
java.lang.NoSuchMethodError: java.util.concurrent.ConcurrentHashMap.keySet()的问题。
改com.alibaba.dubbo.common.utils.ConcurrentHashSet 第30行 :
private final ConcurrentHashMap<E, Object> map;
改为:
private final Map<E, Object> map;
或将其用Set代替
private final Set<E> set;
public ConcurrentHashSet(){
set = Collections.newSetFromMap(new ConcurrentHashMap<E, Boolean>());
}
像这样。
Invalid property 'URIType' of bean class [com.alibaba.citrus.service.uribroker.uri.GenericURIBroker]: 的问题将spring换到3以上4以下。最简单的方法就是入上面 @stirp 所说。
首先谢谢@stirp ,通过升级citrus-webx-all 和spring 等,目前已不再报URIType 的错误了,但是现在tomcat卡在了Strarting ZkClient event thead.
@googlefan 堆栈贴一下
http://my.oschina.net/u/1539359/blog/482926
2015-07-23 16:02 GMT+08:00 XiaoFei.Wu [email protected]:
@googlefan https://github.com/googlefan 堆栈贴一下
— Reply to this email directly or view it on GitHub https://github.com/alibaba/dubbo/issues/50#issuecomment-124012746.
@stirp首先要感谢你,我试验了下,只需要将war解压后的lib中的Spring包修改为3以上就可以(本人是3.2.9),然后由于端口占用问题导致网页打不开,将端口8080改以下就OK了。
各位大神,我按照你们的做了,为什么出现下面的错误呢? Line 30 in XML document from ServletContext resource [/WEB-INF/webx.xml] is invalid; nested exception is org.xml.sax.SAXParseException; lineNumber: 30; columnNumber: 41; cvc-complex-type.2.4.a: 发现了以元素 'services:property' 开头的无效内容。应以 '{property}' 之一开头。
@dolt131943 贴下xml
@stirp JDK1.8,运行成功,感谢!
照着上面改了之后出现另外的错误
Caused by: org.springframework.core.NestedIOException: ASM ClassReader failed to parse class file - probably due to a new Java class file version that isn't supported yet: file [/Users/wsqsoul/soft/dubbo/dubbo-admin/target/classes/com/alibaba/dubbo/governance/web/common/module/screen/Error_404.class]; nested exception is java.lang.IllegalArgumentException
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:56)
at org.springframework.core.type.classreading.SimpleMetadataReaderFactory.getMetadataReader(SimpleMetadataReaderFactory.java:80)
at org.springframework.core.type.classreading.CachingMetadataReaderFactory.getMetadataReader(CachingMetadataReaderFactory.java:102)
at org.springframework.context.annotation.ClassPathScanningCandidateComponentProvider.findCandidateComponents(ClassPathScanningCandidateComponentProvider.java:266)
... 75 more
Caused by: java.lang.IllegalArgumentException
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.asm.ClassReader.<init>(Unknown Source)
at org.springframework.core.type.classreading.SimpleMetadataReader.<init>(SimpleMetadataReader.java:53)
... 78 more
请教是不是jdk8必须用spring4+,但是将spring升级到4.0之后又出现另外的错误