java.lang.NoSuchMethodError:org.springframework.beans.MutablePropertyValues

时间:2015-04-30 08:47:31

标签: java spring maven

我使用:     Maven 3.3.1,     Java SE 1.7,     JavaServerFaces 2.1,     JPA 2.0,     春季4.0.9,     Hibernate 4.1.9.Final, 我收到了以下错误:

java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add(Ljava/lang/String;Ljava/lang/Object;)Lorg/springframework/beans/MutablePropertyValues;

我的pom.xml:

    <dependency> 
       <groupId>org.springframework.webflow</groupId> 
       <artifactId>org.springframework.webflow</artifactId> 
       <version>2.0.5.RELEASE</version> 
       <exclusions> 
        <exclusion> 
            <groupId>org.springframework</groupId> 
            <artifactId>spring-beans</artifactId> 
        </exclusion> 
       </exclusions> 
   </dependency> 
   <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-aspects</artifactId>
    <version>4.0.9.RELEASE</version>
  </dependency>
  <dependency> 
    <groupId>org.springframework</groupId> 
    <artifactId>spring-beans</artifactId> 
    <version>4.0.9.RELEASE</version> 
  </dependency> 
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-context-support</artifactId>
    <version>4.0.9.RELEASE</version>
  </dependency>
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-instrument</artifactId>
    <version>4.0.9.RELEASE</version>
  </dependency>
  <dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jdbc</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-jms</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-orm</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-oxm</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-messaging</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-test</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency> 
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-webmvc-portlet</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>
<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-websocket</artifactId>
    <version>4.0.9.RELEASE</version>
</dependency>

My Maven Dependencies:

  • spring 2.5.6.jar
  • org.springframework.webflow 2.0.5.RELEASE
  • org.springframework.binding 2.0.5.RELEASE
  • org.springframework.js 2.0.5.RELEASE
  • spring-aspects 4.0.9.RELEASE
  • spring-beans 4.0.9RELEASE
  • spring-context-support 4.0.9.REALEASE
  • spring-instrument 4.0.9.RELEASE
  • spring-jdbc 4.0.9.RELEASE
  • spring-jms 4.0.9.RELEASE
  • spring-orm 4.0.9.RELEASE
  • spring-oxm 4.0.9.RELEASE
  • spring-messaging 4.0.9.RELEASE
  • spring-web 4.0.9.RELEASE
  • spring-test 4.0.9.RELEASE
  • spring-webmvc 4.0.9.RELEASE
  • spring-expression 4.0.9.RELEASE
  • spring-webmvc-portlet 4.0.9.RELEASE
  • spring-websocket 4.0.9.RELEASE
  • spring-data-jpa 1.8.0.RELEASE
  • spring-data-commons 1.10.0.RELEASE
  • spring-context 4.0.9.RELEASE
  • spring-aop 4.0.9.RELEASE
  • spring-tx 4.0.9.RELEASE
  • spring-core 4.0.9.RELEASE

我看了java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add,但我找不到答案。 任何想法如何解决这个问题?

2 个答案:

答案 0 :(得分:0)

你的答案在这里:

java.lang.NoSuchMethodError: org.springframework.beans.MutablePropertyValues.add

该方法在Spring 3.x中添加

答案 1 :(得分:0)

您必须使用2.4.1.RELEASE

的版本spring-webflow
<dependency>
    <groupId>org.springframework.webflow</groupId>
    <artifactId>spring-webflow</artifactId>
    <version>2.4.1.RELEASE</version>
</dependency>

版本2.0.5.RELEASE适用于spring framework 2.x版本