Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

2.5.4-SNAPSHOT dubbo admin error #50

Closed
ddatsh opened this Issue Jun 6, 2014 · 62 comments

Comments

Projects
None yet
@ddatsh
Copy link

commented Jun 6, 2014

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

This comment has been minimized.

Copy link
Author

commented Jun 7, 2014

切到 2.5.3 编译也是同样

@ddatsh

This comment has been minimized.

Copy link
Author

commented Jun 11, 2014

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

@ddatsh ddatsh closed this Jun 11, 2014

@lichenglingl

This comment has been minimized.

Copy link

commented Aug 11, 2014

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

This comment has been minimized.

Copy link

commented Aug 12, 2014

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

@ddatsh

This comment has been minimized.

Copy link
Author

commented Sep 15, 2014

解决 dubbo-admin jdk8 运行

<webx_version>3.0.8</webx_version>

升级为

<webx_version>3.1.6</webx_version>

dubbo-admin项目再加上velocity 依赖

@wumingabc

This comment has been minimized.

Copy link

commented Dec 11, 2014

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

@cnzxp521

This comment has been minimized.

Copy link

commented Mar 2, 2015

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

This comment has been minimized.

Copy link

commented Mar 2, 2015

当时解决是 将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

This comment has been minimized.

Copy link

commented May 19, 2015

我使用的是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

This comment has been minimized.

Copy link

commented May 23, 2015

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

@lwkjob

This comment has been minimized.

Copy link

commented May 28, 2015

@stirp 谢谢

@achang1230

This comment has been minimized.

Copy link

commented Jul 9, 2015

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

This comment has been minimized.

Copy link

commented Jul 23, 2015

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

@teaey

This comment has been minimized.

Copy link
Contributor

commented Jul 23, 2015

@googlefan 堆栈贴一下

@googlefan

This comment has been minimized.

Copy link

commented Jul 24, 2015

http://my.oschina.net/u/1539359/blog/482926

2015-07-23 16:02 GMT+08:00 XiaoFei.Wu notifications@github.com:

@googlefan https://github.com/googlefan 堆栈贴一下


Reply to this email directly or view it on GitHub
#50 (comment).

yuankui added a commit to yuankui/dubbo that referenced this issue Aug 28, 2015

@WZBob

This comment has been minimized.

Copy link

commented Sep 18, 2015

@stirp首先要感谢你,我试验了下,只需要将war解压后的lib中的Spring包修改为3以上就可以(本人是3.2.9),然后由于端口占用问题导致网页打不开,将端口8080改以下就OK了。

@l371559739

This comment has been minimized.

Copy link

commented Nov 19, 2015

各位大神,我按照你们的做了,为什么出现下面的错误呢?
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}' 之一开头。

@teaey

This comment has been minimized.

Copy link
Contributor

commented Dec 11, 2015

@dolt131943 贴下xml

@johntostring

This comment has been minimized.

Copy link

commented Jan 3, 2016

@stirp JDK1.8,运行成功,感谢!

@sergewu

This comment has been minimized.

Copy link

commented Jan 7, 2016

照着上面改了之后出现另外的错误

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之后又出现另外的错误

@sergewu

This comment has been minimized.

Copy link

commented Jan 7, 2016

@stirp 请问有遇到这样的情况吗?

@johntostring

This comment has been minimized.

Copy link

commented Jan 7, 2016

@sachwu
原因:jdk1.8编译过的类被Spring 3.2框架使用时不被Spring 3.2 支持
解决:降级jdk到1.7,或者升级Spring到4.0
参考:
http://stackoverflow.com/questions/22526695/java-1-8-asm-classreader-failed-to-parse-class-file-probably-due-to-a-new-java

@sergewu

This comment has been minimized.

Copy link

commented Jan 8, 2016

@johntostring
因为有的地方需要用到jdk1.8,所以打算采用升级spring到4.0+的做法 但是 webx貌似不能直接使用spring4

@lizhou828

This comment has been minimized.

Copy link

commented Jan 12, 2016

我的JDK也是1.8 ,也遇到同样的问题...... 把JDK切换成1.6后,居然就好了。。。。

@xiegengcai

This comment has been minimized.

Copy link

commented Jan 12, 2016

修改pom依赖就支持了,搜一下bug列表,之前有人发过了

@stirp

This comment has been minimized.

Copy link

commented Jan 18, 2016

@sachwu 我使用的是spring4.1.1,webx的版本3.1.6,没有发现问题,你可以放心上

@sergewu

This comment has been minimized.

Copy link

commented Jan 18, 2016

@stirp 升级到4.1.1或者更高的版本后提示这个 困扰我好久了

[ERROR] Failed startup of context org.mortbay.jetty.plugin.Jetty6PluginWebAppContext@9e30f9a{/,/Users/wsqsoul/soft/dubbo/dubbo-admin/src/main/webapp}
org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:344)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:304)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:180)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:216)
    at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:187)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:125)
    at org.springframework.web.context.support.XmlWebApplicationContext.loadBeanDefinitions(XmlWebApplicationContext.java:94)
    at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:129)
    at org.springframework.context.support.AbstractApplicationContext.obtainFreshBeanFactory(AbstractApplicationContext.java:537)
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:452)
    at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:403)
    at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:306)
    at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:106)
    at org.mortbay.jetty.handler.ContextHandler.startContext(ContextHandler.java:549)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:136)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
    at org.mortbay.jetty.plugin.Jetty6PluginWebAppContext.doStart(Jetty6PluginWebAppContext.java:115)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.plugin.Jetty6PluginServer.start(Jetty6PluginServer.java:132)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.startJetty(AbstractJettyMojo.java:454)
    at org.mortbay.jetty.plugin.AbstractJettyMojo.execute(AbstractJettyMojo.java:396)
    at org.mortbay.jetty.plugin.AbstractJettyRunMojo.execute(AbstractJettyRunMojo.java:210)
    at org.mortbay.jetty.plugin.Jetty6RunMojo.execute(Jetty6RunMojo.java:184)
    at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:134)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
    at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
    at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
    at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
    at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:128)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:307)
    at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:193)
    at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:106)
    at org.apache.maven.cli.MavenCli.execute(MavenCli.java:862)
    at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:286)
    at org.apache.maven.cli.MavenCli.main(MavenCli.java:197)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:497)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
    at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
    at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
    at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
Caused by: java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
    at org.springframework.web.context.support.ServletContextResource.getInputStream(ServletContextResource.java:141)
    at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:330)
    ... 54 more

这是我dubbo根目录下pom配置

<!--
 - Copyright 1999-2011 Alibaba Group.
 -  
 - Licensed under the Apache License, Version 2.0 (the "License");
 - you may not use this file except in compliance with the License.
 - You may obtain a copy of the License at
 -  
 -    http://www.apache.org/licenses/LICENSE-2.0
 -  
 - Unless required by applicable law or agreed to in writing, software
 - distributed under the License is distributed on an "AS IS" BASIS,
 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 - See the License for the specific language governing permissions and
 - limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <groupId>com.alibaba</groupId>
    <artifactId>dubbo-parent</artifactId>
    <version>2.5.4-SNAPSHOT</version>
    <packaging>pom</packaging>
    <name>${project.artifactId}</name>
    <description>The parent project of dubbo</description>
    <url>http://code.alibabatech.com/wiki/display/dubbo</url>
    <inceptionYear>2011</inceptionYear>
    <licenses>
        <license>
            <name>Apache 2</name>
            <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
            <distribution>repo</distribution>
            <comments>A business-friendly OSS license</comments>
        </license>
    </licenses>
    <organization>
        <name>Alibaba</name>
        <url>http://www.alibaba.com</url>
    </organization>
    <modules>
        <module>hessian-lite</module>
        <module>dubbo-common</module>
        <module>dubbo-container</module>
        <module>dubbo-remoting</module>
        <module>dubbo-rpc</module>
        <module>dubbo-filter</module>
        <module>dubbo-cluster</module>
        <module>dubbo-registry</module>
        <module>dubbo-monitor</module>
        <module>dubbo-config</module>
        <module>dubbo</module>
        <module>dubbo-simple</module>
        <module>dubbo-admin</module>
        <module>dubbo-demo</module>
    </modules>
    <profiles>
        <profile>
            <id>test</id>
            <activation>
                <file>
                    <missing>.project</missing>
                </file>
            </activation>
            <modules>
                <module>dubbo-test</module>
            </modules>
        </profile>
        <profile>
            <id>hudson</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-surefire-plugin</artifactId>
                        <configuration>
                            <testFailureIgnore>true</testFailureIgnore>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
    <properties>
        <!-- Common libs -->
        <spring_version>2.5.6.SEC03</spring_version>
        <javassist_version>3.15.0-GA</javassist_version>
        <netty_version>3.2.5.Final</netty_version>
        <mina_version>1.1.7</mina_version>
        <grizzly_version>2.1.4</grizzly_version>
        <httpclient_version>4.1.2</httpclient_version>
        <hessian_lite_version>3.2.1-fixed-2</hessian_lite_version>
        <xstream_version>1.4.1</xstream_version>
        <fastjson_version>1.1.39</fastjson_version>
        <bsf_version>3.1</bsf_version>
        <sorcerer_version>0.8</sorcerer_version>
        <zookeeper_version>3.3.3</zookeeper_version>
        <zkclient_version>0.1</zkclient_version>
        <curator_version>1.1.16</curator_version>
        <jedis_version>2.1.0</jedis_version>
        <xmemcached_version>1.3.6</xmemcached_version>
        <cxf_version>2.6.1</cxf_version>
        <thrift_version>0.8.0</thrift_version>
        <jfreechart_version>1.0.13</jfreechart_version>
        <hessian_version>4.0.7</hessian_version>
        <servlet_version>2.5</servlet_version>
        <jetty_version>6.1.26</jetty_version>
        <validation_version>1.0.0.GA</validation_version>
        <hibernate_validator_version>4.2.0.Final</hibernate_validator_version>
        <jcache_version>0.4</jcache_version>
        <sca_version>2.0-M5.1</sca_version>
        <guice_version>3.0</guice_version>
        <cglib_version>2.2</cglib_version>
        <webx_version>3.1.6</webx_version>
        <velocity_version>1.7</velocity_version>
        <!-- Log libs -->
        <slf4j_version>1.6.2</slf4j_version>
        <jcl_version>1.1</jcl_version>
        <log4j_version>1.2.16</log4j_version>
        <logback_version>1.0.6</logback_version>
        <!-- Test libs -->
        <junit_version>4.10</junit_version>
        <easymock_version>3.0</easymock_version>
        <jmockit_version>0.999.8</jmockit_version>
        <!-- Build args -->
        <!--<argline>-server -Xms64m -Xmx64m -XX:PermSize=64m -XX:MaxPermSize=64m</argline>-->
        <skip_maven_deploy>false</skip_maven_deploy>
        <updateReleaseInfo>true</updateReleaseInfo>
        <project.build.sourceEncoding>${file_encoding}</project.build.sourceEncoding>

        <!-- generate idea copyright -->
        <copyright>Copyright 1999-2012 Alibaba Group.&#10; &#10;Licensed under the Apache License, Version 2.0 (the &quot;License&quot;);&#10;you may not use this file except in compliance with the License.&#10;You may obtain a copy of the License at&#10; &#10;     http://www.apache.org/licenses/LICENSE-2.0&#10; &#10;Unless required by applicable law or agreed to in writing, software&#10;distributed under the License is distributed on an &quot;AS IS&quot; BASIS,&#10;WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.&#10;See the License for the specific language governing permissions and&#10;limitations under the License.</copyright>
        <profile.name>oss</profile.name>

        <!-- for maven compiler plugin -->
        <maven_compiler_plugin_version>2.3.2</maven_compiler_plugin_version>
        <java_source_version>1.8</java_source_version>
        <java_target_version>1.8</java_target_version>
        <file_encoding>UTF-8</file_encoding>

    </properties>
    <dependencyManagement>
        <dependencies>
            <!-- Common libs -->
            <dependency>
                <groupId>org.springframework</groupId>
                <artifactId>spring</artifactId>
                <version>${spring_version}</version>
            </dependency>
            <dependency>
                <groupId>org.javassist</groupId>
                <artifactId>javassist</artifactId>
                <version>${javassist_version}</version>
            </dependency>
            <dependency>
                <groupId>org.jboss.netty</groupId>
                <artifactId>netty</artifactId>
                <version>${netty_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.mina</groupId>
                <artifactId>mina-core</artifactId>
                <version>${mina_version}</version>
            </dependency>
            <dependency>
                <groupId>org.glassfish.grizzly</groupId>
                <artifactId>grizzly-core</artifactId>
                <version>${grizzly_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.httpcomponents</groupId>
                <artifactId>httpclient</artifactId>
                <version>${httpclient_version}</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>hessian-lite</artifactId>
                <version>${hessian_lite_version}</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba</groupId>
                <artifactId>fastjson</artifactId>
                <version>${fastjson_version}</version>
            </dependency>
            <dependency>
                <groupId>com.thoughtworks.xstream</groupId>
                <artifactId>xstream</artifactId>
                <version>${xstream_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.bsf</groupId>
                <artifactId>bsf-api</artifactId>
                <version>${bsf_version}</version>
            </dependency>
            <dependency>
                <groupId>org.jvnet.sorcerer</groupId>
                <artifactId>sorcerer-javac</artifactId>
                <version>${sorcerer_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.zookeeper</groupId>
                <artifactId>zookeeper</artifactId>
                <version>${zookeeper_version}</version>
            </dependency>
            <dependency>
                <groupId>com.github.sgroschupf</groupId>
                <artifactId>zkclient</artifactId>
                <version>${zkclient_version}</version>
            </dependency>
            <dependency>
                <groupId>com.netflix.curator</groupId>
                <artifactId>curator-framework</artifactId>
                <version>${curator_version}</version>
            </dependency>
            <dependency>
                <groupId>redis.clients</groupId>
                <artifactId>jedis</artifactId>
                <version>${jedis_version}</version>
            </dependency>
            <dependency>
                <groupId>com.googlecode.xmemcached</groupId>
                <artifactId>xmemcached</artifactId>
                <version>${xmemcached_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-frontend-simple</artifactId>
                <version>${cxf_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.cxf</groupId>
                <artifactId>cxf-rt-transports-http</artifactId>
                <version>${cxf_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.thrift</groupId>
                <artifactId>libthrift</artifactId>
                <version>${thrift_version}</version>
            </dependency>
            <dependency>
                <groupId>jfree</groupId>
                <artifactId>jfreechart</artifactId>
                <version>${jfreechart_version}</version>
            </dependency>
            <dependency>
                <groupId>com.caucho</groupId>
                <artifactId>hessian</artifactId>
                <version>${hessian_version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>servlet-api</artifactId>
                <version>${servlet_version}</version>
            </dependency>
            <dependency>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>jetty</artifactId>
                <version>${jetty_version}</version>
            </dependency>
            <dependency>
                <groupId>javax.validation</groupId>
                <artifactId>validation-api</artifactId>
                <version>${validation_version}</version>
            </dependency>
            <dependency>
                <groupId>org.hibernate</groupId>
                <artifactId>hibernate-validator</artifactId>
                <version>${hibernate_validator_version}</version>
            </dependency>
            <dependency>
                <groupId>javax.cache</groupId>
                <artifactId>cache-api</artifactId>
                <version>${jcache_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.tuscany.sca</groupId>
                <artifactId>tuscany-sca-api</artifactId>
                <version>${sca_version}</version>
            </dependency>
            <dependency>
                <groupId>com.google.inject</groupId>
                <artifactId>guice</artifactId>
                <version>${guice_version}</version>
            </dependency>
            <dependency>
                <groupId>com.alibaba.citrus</groupId>
                <artifactId>citrus-webx-all</artifactId>
                <version>${webx_version}</version>
            </dependency>
            <dependency>
                <groupId>org.apache.velocity</groupId>
                <artifactId>velocity</artifactId>
                <version>${velocity_version}</version>
            </dependency>
            <!-- Log libs -->
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-api</artifactId>
                <version>${slf4j_version}</version>
            </dependency>
            <dependency>
                <groupId>org.slf4j</groupId>
                <artifactId>slf4j-log4j12</artifactId>
                <version>${slf4j_version}</version>
            </dependency>
            <dependency>
                <groupId>commons-logging</groupId>
                <artifactId>commons-logging-api</artifactId>
                <version>${jcl_version}</version>
            </dependency>
            <dependency>
                <groupId>log4j</groupId>
                <artifactId>log4j</artifactId>
                <version>${log4j_version}</version>
            </dependency>
            <dependency>
                <groupId>ch.qos.logback</groupId>
                <artifactId>logback-classic</artifactId>
                <version>${logback_version}</version>
            </dependency>
            <!-- Test libs -->
            <dependency>
                <groupId>junit</groupId>
                <artifactId>junit</artifactId>
                <version>${junit_version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymock</artifactId>
                <version>${easymock_version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>com.googlecode.jmockit</groupId>
                <artifactId>jmockit</artifactId>
                <version>${jmockit_version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>org.easymock</groupId>
                <artifactId>easymockclassextension</artifactId>
                <version>${easymock_version}</version>
                <scope>test</scope>
            </dependency>
            <dependency>
                <groupId>cglib</groupId>
                <artifactId>cglib-nodep</artifactId>
                <version>${cglib_version}</version>
            </dependency>
        </dependencies>
    </dependencyManagement>
    <dependencies>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymock</artifactId>
        </dependency>
        <dependency>
            <groupId>org.easymock</groupId>
            <artifactId>easymockclassextension</artifactId>
        </dependency>
            <dependency>
            <groupId>com.googlecode.jmockit</groupId>
            <artifactId>jmockit</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <addMavenDescriptor>true</addMavenDescriptor>
                        <index>true</index>
                        <manifest>
                            <addDefaultSpecificationEntries>true</addDefaultSpecificationEntries>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <useSystemClassLoader>true</useSystemClassLoader>
                    <forkMode>once</forkMode>
                    <argLine>${argline}</argLine>
                    <systemProperties>
                        <!-- common shared -->
                        <property>
                            <name>transporter</name>
                            <value>${transporter}</value>
                        </property>
                        <property>
                            <name>serialization</name>
                            <value>${serialization}</value>
                        </property>
                        <!-- server side -->
                        <property>
                            <name>port</name>
                            <value>${port}</value>
                        </property>
                        <property>
                            <name>threadpool</name>
                            <value>${threadpool}</value>
                        </property>
                        <property>
                            <name>threads</name>
                            <value>${threads}</value>
                        </property>
                        <property>
                            <name>iothreads</name>
                            <value>${iothreads}</value>
                        </property>
                        <!-- client side -->
                        <property>
                            <name>server</name>
                            <value>${server}</value>
                        </property>
                        <property>
                            <name>timeout</name>
                            <value>${timeout}</value>
                        </property>
                        <property>
                            <name>length</name>
                            <value>${length}</value>
                        </property>
                        <property>
                            <name>connections</name>
                            <value>${connections}</value>
                        </property>
                        <property>
                            <name>base</name>
                            <value>${base}</value>
                        </property>
                        <property>
                            <name>concurrent</name>
                            <value>${concurrent}</value>
                        </property>
                        <property>
                            <name>runs</name>
                            <value>${runs}</value>
                        </property>
                        <property>
                            <name>onerror</name>
                            <value>${onerror}</value>
                        </property>
                    </systemProperties>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-deploy-plugin</artifactId>
                <configuration>
                    <skip>${skip_maven_deploy}</skip>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <issueManagement>
        <system>github</system>
        <url>https://github.com/alibaba/dubbo/issues</url>
    </issueManagement>
    <scm>
        <url>https://github.com/alibaba/dubbo</url>
        <connection>https://github.com/alibaba/dubbo.git</connection>
    </scm>
    <mailingLists>
        <mailingList>
            <name>Dubbo User Mailling List</name>
            <subscribe>dubbo-subscribe AT googlegroups DOT com</subscribe>
            <unsubscribe>dubbo-unsubscribe AT googlegroups DOT com</unsubscribe>
            <post>dubbo AT googlegroups DOT com</post>
            <archive>http://groups.google.com/group/dubbo</archive>
        </mailingList>
    </mailingLists>
    <developers>
        <developer>
            <name>QianXiao(Shawn)</name>
            <id>shawn.qianx</id>
            <email>shawn.qianx (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>LiangFei(William)</name>
            <id>william.liangf</id>
            <email>william.liangf (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>LiDing(Jerry)</name>
            <id>ding.lid</id>
            <email>ding.lid (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>LiuChao(Charles)</name>
            <id>chao.liuc</id>
            <email>chao.liuc (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>LiuHaoMin(Ludvik)</name>
            <id>haoming.liuhm</id>
            <email>haoming.liuhm (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>ChenLei(Tony)</name>
            <id>tony.chenl</id>
            <email>tony.chenl (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
        <developer>
            <name>LvGang(Kimi)</name>
            <id>gang.lvg</id>
            <email>gang.lvg (AT) alibaba-inc.com</email>
            <roles>
                <role>Developer</role>
            </roles>
            <timezone>+8</timezone>
        </developer>
    </developers>
</project>

这是dubbo-admin目录下pom配置

<!--
 - Copyright 1999-2011 Alibaba Group.
 -  
 - Licensed under the Apache License, Version 2.0 (the "License");
 - you may not use this file except in compliance with the License.
 - You may obtain a copy of the License at
 -  
 -      http://www.apache.org/licenses/LICENSE-2.0
 -  
 - Unless required by applicable law or agreed to in writing, software
 - distributed under the License is distributed on an "AS IS" BASIS,
 - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 - See the License for the specific language governing permissions and
 - limitations under the License.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>com.alibaba</groupId>
        <artifactId>dubbo-parent</artifactId>
        <version>2.5.4-SNAPSHOT</version>
    </parent>
    <artifactId>dubbo-admin</artifactId>
    <packaging>war</packaging>
    <name>${project.artifactId}</name>
    <description>The admin module of dubbo project</description>
    <properties>
        <wtpversion>1.5</wtpversion>
        <wtpContextName>/</wtpContextName>
        <eclipse.useProjectReferences>false</eclipse.useProjectReferences>
        <skip_maven_deploy>false</skip_maven_deploy>
        <spring-version>4.1.1.RELEASE</spring-version>
    </properties>
    <dependencies>
        <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>
        <dependency>
            <groupId>com.alibaba.citrus</groupId>
            <artifactId>citrus-webx-all</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.velocity</groupId>
            <artifactId>velocity</artifactId>
        </dependency>
        <!--
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
        </dependency>
         -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-core</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-beans</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-aop</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-context-support</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-tx</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-jdbc</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-orm</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-web</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-webmvc</artifactId>
            <version>${spring-version}</version>
        </dependency>
        <dependency>
            <groupId>org.javassist</groupId>
            <artifactId>javassist</artifactId>
        </dependency>
        <dependency>
            <groupId>org.jboss.netty</groupId>
            <artifactId>netty</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.mina</groupId>
            <artifactId>mina-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.glassfish.grizzly</groupId>
            <artifactId>grizzly-core</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
        </dependency>
        <dependency>
            <groupId>com.alibaba</groupId>
            <artifactId>fastjson</artifactId>
        </dependency>
        <dependency>
            <groupId>com.thoughtworks.xstream</groupId>
            <artifactId>xstream</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.bsf</groupId>
            <artifactId>bsf-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.zookeeper</groupId>
            <artifactId>zookeeper</artifactId>
        </dependency>
        <dependency>
            <groupId>com.github.sgroschupf</groupId>
            <artifactId>zkclient</artifactId>
        </dependency>
        <dependency>
            <groupId>com.netflix.curator</groupId>
            <artifactId>curator-framework</artifactId>
        </dependency>
        <dependency>
            <groupId>com.googlecode.xmemcached</groupId>
            <artifactId>xmemcached</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.thrift</groupId>
            <artifactId>libthrift</artifactId>
        </dependency>
        <dependency>
            <groupId>com.caucho</groupId>
            <artifactId>hessian</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-log4j12</artifactId>
        </dependency>
        <dependency>
            <groupId>redis.clients</groupId>
            <artifactId>jedis</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.validation</groupId>
            <artifactId>validation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.hibernate</groupId>
            <artifactId>hibernate-validator</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.cache</groupId>
            <artifactId>cache-api</artifactId>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.mortbay.jetty</groupId>
                <artifactId>maven-jetty-plugin</artifactId>
                <version>${jetty_version}</version>
                <configuration>
                    <contextPath>/</contextPath>
                    <scanIntervalSeconds>10</scanIntervalSeconds>
                    <connectors>
                        <connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
                            <port>8080</port>
                            <maxIdleTime>60000</maxIdleTime>
                        </connector>
                    </connectors>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>

不知道我这样升级spring4对不对

@junbaor

This comment has been minimized.

Copy link

commented Jun 7, 2016

@stirp 👍

@tinyking

This comment has been minimized.

Copy link

commented Jun 8, 2016

@luolluol

This comment has been minimized.

Copy link

commented Sep 19, 2016

jdk8 tomcat8下
最新master分支代码,按照@stirp描述进行修改后,依然报错, 有没有同学知道是什么原因?

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?

@luolluol

This comment has been minimized.

Copy link

commented Sep 19, 2016

是com.alibaba.citrus.service.uribroker.uri.GenericURIBroker 类里面的 URIType 问题
但是父类com.alibaba.citrus.service.uribroker.uri.URIBroker中其实是有setter,getter的,只是不符合驼峰规则,不知道如何解决

public URIBroker.URIType getURIType() {
    return this.type;
}

public URIBroker setURIType(URIBroker.URIType type) {
    this.type = type;
    return this;
}

1241264331@qq.com

From: junbaor
Date: 2016-09-19 18:01
To: alibaba/dubbo
CC: stoneluo; Mention
Subject: Re: [alibaba/dubbo] 2.5.4-SNAPSHOT dubbo admin error (#50)
@stoneluo 模糊的记得最新版的 dubbo-admin 已经兼容 JDK 1.8 了,你的那个错误好像是com.alibaba.citrus.service.uribroker.uri.GenericURIBroker 类的 URIType 字段没有 set 方法,可以自己生成一下试试。

You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.

@junbaor

This comment has been minimized.

Copy link

commented Sep 19, 2016

@stoneluo 刚 checkout 了一下最新的代码,mvn package -Dmaven.test.skip 是成功的。
如果没有错误建议先不要修改工程文件直接打包试试看。

@luolluol

This comment has been minimized.

Copy link

commented Sep 19, 2016

@junbaor 还原到master代码,dubbo-admin打包部署到tomcat8,jdk8 还是报同样的"URIType"错误,请问你那边使用 jdk8 能正常启动吗?

@junbaor

This comment has been minimized.

Copy link

commented Sep 19, 2016

@stoneluo 刚试了下 checkout master 分支后直接打包,丢到 tomcat 下启动没异常。

@luolluol

This comment has been minimized.

Copy link

commented Sep 20, 2016

@junbaor 搞清楚为什么我们说的不一致了

执行dubbo-parent的package,打出的dubbo-admin war包在jdk8 tomcat8下没有问题

执行dubbo-admin的package,打出的war包有"URIType"错误

原来是我本地m2库jar包的问题,确实是checkout下来的代码,本身就支持了jdk8
感谢!@junbaor

@caidchen1988

This comment has been minimized.

Copy link

commented Nov 9, 2016

@sachwu 你的那个问题是否解决?把spring的版本换成3.2.x就可以了

@sergewu

This comment has been minimized.

Copy link

commented Nov 18, 2016

@caidchen1988 之前我将jdk换成了1.6 最近没有关注这个问题了

@quintonhsu

This comment has been minimized.

Copy link

commented Dec 20, 2016

按照 @stirp 的方法做了,还是不行,用jdk1.6和1.7的都不行,报这个错误,请问是什么原因呢
ERROR context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'templateService': Cannot create inner bean 'com.alibaba.citrus.service.velocity.impl.VelocityEngineImpl#ab50d0a' of type [com.alibaba.citrus.service.velocity.impl.VelocityEngineImpl] while setting bean property 'engines' with key [com.alibaba.citrus.service.velocity.impl.VelocityEngineImpl#ab50d0a]; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.alibaba.citrus.service.velocity.impl.VelocityEngineImpl#ab50d0a': Instantiation of bean failed; nested exception is org.springframework.beans.BeanInstantiationException: Could not instantiate bean class [com.alibaba.citrus.service.velocity.impl.VelocityEngineImpl]: Constructor threw exception; nested exception is java.lang.NoClassDefFoundError: org/apache/commons/collections/ExtendedProperties at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveInnerBean(BeanDefinitionValueResolver.java:287) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:122) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveManagedMap(BeanDefinitionValueResolver.java:384) at org.springframework.beans.factory.support.BeanDefinitionValueResolver.resolveValueIfNecessary(BeanDefinitionValueResolver.java:165) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyPropertyValues(AbstractAutowireCapableBeanFactory.java:1419) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1160) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:458)

@chlsmile

This comment has been minimized.

Copy link

commented Mar 10, 2017

我用的是dubbo-admin是2.5.3版本,tomcat版本是8,jdk版本是1.8,启动tomcat时也是抛出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?异常

直接将lib包下的所有spring版本进行升级,我直接升级到了spring-aop-3.2.16.RELEAS,然后启动tomcat,问题得到了解决,可以正常启动。但没有分析出根本原因,究竟是jdk8对setter方法有约束还是spring低版本反射的时候出了问题

@judasn

This comment has been minimized.

Copy link

commented Mar 23, 2017

@stirp 的方案是可以的,但是对环境没有更加准确的描述,我来补充下:
需要环境:

  • CentOS 6(其他系统没测试过)
  • JDK 1.8(必须是 1.8,1.7 会报错)
  • Tomcat 7 或 8(我测试都可以)
  • Dubbo 版本:2.5.4-SNAPSHOT(当前这个版本是最新的。2.5.3 我测试是不行的)
@Learning520

This comment has been minimized.

Copy link

commented Jun 6, 2017

@sergewu JDK1.8也可以通过编译运行。首先按照stirp 的方案执行,确保spring版本是3.2.X(确保的方法是:mvn打包后spring的版本是否是3.2.X,选择spring4.X是不行的,会出现你截图的错误),另外dubbo-admin依赖的dubbo,我选择的是2.5.3
<dependency><groupId>com.alibaba</groupId><artifactId>dubbo</artifactId<version>2.5.3</version><exclusions><exclusion<groupId>org.springframework</groupId><artifactId>spring</artifactId></exclusion></exclusions></dependency>

@chenlushun

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2017

我这边打包编译都是没有问题的,Jdk 1.8
不过通常情况下,我不会执行单元测试,maven在打包编译的时候后面加上参数 -DskipTests

@skyjilygao

This comment has been minimized.

Copy link

commented Jun 26, 2017

@stirp 的方案是可以的。对于我的来说,改来pom.xml不行,我的lib下spring是2.5.6的,替换成3.2.16就可以了

@GalaxyExplosion2017

This comment has been minimized.

Copy link

commented Aug 25, 2017

tomcat部署dubbo2.5.4启动之后,查看控制台一直卡在
INFO interceptor.AuthorizationValve - [DUBBO] AuthorizationValve of uri: /dubbo-admin/, dubbo version: 2.5.4-SNAPSHOT 这里不动了,求解该怎么办

@gwfeng

This comment has been minimized.

Copy link

commented Sep 7, 2017

已经放弃改配置。
尝试了升级spring到4.2,失败
尝试改dubbo-admin里面的pom文件@stirp,还是失败

还是降jdk为1.7,成功!

@stirp

This comment has been minimized.

Copy link

commented Sep 7, 2017

@haotian2546

This comment has been minimized.

Copy link

commented Sep 8, 2017

最新版本,启动报错:
Could not open ServletContext resource [/WEB-INF/applicationContext.xml]
请问要如何解决呢?(jdk1.7、1.8都是如此)

@EdwinLi

This comment has been minimized.

Copy link

commented Sep 11, 2017

我的也是同样的错误,2.5.4,一直报org.springframework.beans.factory.BeanDefinitionStoreException: IOException parsing XML document from ServletContext resource [/WEB-INF/applicationContext.xml]; nested exception is java.io.FileNotFoundException: Could not open ServletContext resource [/WEB-INF/applicationContext.xml]

@EdwinLi

This comment has been minimized.

Copy link

commented Sep 11, 2017

这个是什么原因呢?

@zenghao079

This comment has been minimized.

Copy link

commented Sep 12, 2017

@EdwinLi 我今天搞了一天,环境是jdk1.8 centos7 ,这个错误最后解决办法是将spring版本修改为3.2.X
我改的是
<spring_version>3.2.18.RELEASE</spring_version>

@ZRory

This comment has been minimized.

Copy link

commented Sep 21, 2017

@zenghao079 感谢!完美解决了

@edwardlee03

This comment has been minimized.

Copy link

commented Sep 24, 2017

使用 2.5.3 版本部署报错,使用 master 分支的最新 release 版本正常。

# 在 dubbo/ 根目录执行下面命令
$ mvn clean install -Dmaven.test.skip=true
dubbo-admin-2.5.5.war

环境:

  • macOS Sierra(版本 10.12)
  • JDK 1.8.0_112、1.7.0_80(都OK,Dubbo源码编译一起对应)
  • Tomcat 8.5.15、7.0.78(都OK)
  • Dubbo 2.5.5
@luoximin1990

This comment has been minimized.

Copy link

commented Apr 11, 2018

INFO interceptor.AuthorizationValve -
[DUBBO] AuthorizationValve of uri: /, dubbo version: 2.5.3, current host: 192.168.189.1
为什么我搜索这个错误会来到这里?搞了一天,身份拒绝原来是浏览器兼容的问题,谷歌浏览器不行,其他的就可以。。。
为什么???

@wangning1015

This comment has been minimized.

Copy link

commented Sep 18, 2018

我使用的是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,添加速度的依赖,我用了1.7;

    <dependency>
        <groupId>org.apache.velocity</groupId>
        <artifactId>velocity</artifactId>
        <version>1.7</version>
    </dependency>

3,对依赖项达博添加排斥,避免引入旧弹簧

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

jdk1.8.0_181
tomcat8.5.34
dubbo-admin2.5.4(从git下载 自行打包)
按照这个修改pom.xml,启动服务还是报错Could not open ServletContext resource [/WEB-INF/applicationContext.xml]……
求解答

shareblitz pushed a commit to shareblitz/incubator-dubbo that referenced this issue Dec 19, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.