Skip to content

2.5.4-SNAPSHOT dubbo admin error #50

Closed
@ddatsh

Description

@ddatsh
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)

Activity

ddatsh

ddatsh commented on Jun 7, 2014

@ddatsh
Author

切到 2.5.3 编译也是同样

ddatsh

ddatsh commented on Jun 11, 2014

@ddatsh
Author

原因之前找到了,是因为用了jdk8

lichenglingl

lichenglingl commented on Aug 11, 2014

@lichenglingl

你好,我在搭建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

dolt131943

dolt131943 commented on Aug 12, 2014

@dolt131943

各位,有用JDK8运行成功的吗?

ddatsh

ddatsh commented on Sep 15, 2014

@ddatsh
Author

解决 dubbo-admin jdk8 运行

<webx_version>3.0.8</webx_version>

升级为

<webx_version>3.1.6</webx_version>

dubbo-admin项目再加上velocity 依赖

wumingabc

wumingabc commented on Dec 11, 2014

@wumingabc

webx_version 升级为3.1.6;还是不能运行,请问velocity 是哪个 velocity?

cnzxp521

cnzxp521 commented on Mar 2, 2015

@cnzxp521

我也报这个错,升级也没用,用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?

lichenglingl

lichenglingl commented on Mar 2, 2015

@lichenglingl

当时解决是 将tomcat和对应的JDK部署起来就可以了

Date: Sun, 1 Mar 2015 18:05:52 -0800
From: notifications@github.com
To: dubbo@noreply.github.com
CC: lichenglingl@hotmail.com
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.

stirp

stirp commented on May 19, 2015

@stirp

我使用的是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 以下的依赖就行。然后运行正常了。

LiangZiGe

LiangZiGe commented on May 23, 2015

@LiangZiGe

@stirp 按照你的改后,运行成功,感谢。

lwkjob

lwkjob commented on May 28, 2015

@lwkjob

@stirp 谢谢

achang1230

achang1230 commented on Jul 9, 2015

@achang1230

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 所说。

googlefan

googlefan commented on Jul 23, 2015

@googlefan

首先谢谢@stirp ,通过升级citrus-webx-all 和spring 等,目前已不再报URIType 的错误了,但是现在tomcat卡在了Strarting ZkClient event thead.

teaey

teaey commented on Jul 23, 2015

@teaey
Contributor

@googlefan 堆栈贴一下

51 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @zhmz1326@cnzxp521@achang1230@xiegengcai@quintonhsu

        Issue actions

          2.5.4-SNAPSHOT dubbo admin error · Issue #50 · apache/dubbo