2017-10-25 4 views
2

リリース列車をスプリングデータのKay-RELEASEにアップグレードした後、次の例外が発生し始めました。 spring-data-redisのNoSuchMethodError例外

Caused by: java.lang.NoSuchMethodError: org.springframework.util.Assert.isTrue(ZLjava/util/function/Supplier;)V 
at org.springframework.data.redis.connection.RedisStandaloneConfiguration.<init>(RedisStandaloneConfiguration.java:61) 
at org.egov.infra.config.redis.RedisServerConfiguration.redisConnectionFactory(RedisServerConfiguration.java:86) 
at org.egov.infra.config.redis.RedisServerConfiguration$$EnhancerBySpringCGLIB$$f89e20ba.CGLIB$redisConnectionFactory$1(<generated>) 
at org.egov.infra.config.redis.RedisServerConfiguration$$EnhancerBySpringCGLIB$$f89e20ba$$FastClassBySpringCGLIB$$1ac62136.invoke(<generated>) 
at org.springframework.cglib.proxy.MethodProxy.invokeSuper(MethodProxy.java:228) 
at org.springframework.context.annotation.ConfigurationClassEnhancer$BeanMethodInterceptor.intercept(ConfigurationClassEnhancer.java:358) 

は、二重のすべてのjarファイルの依存関係をチェックし、どちらも瓶の重複も異なるバージョンが存在して存在していません。私は春を使用しています 4.3.12.RELEASE

答えて

2

春-データケイ-RELEASE(別名2.0.0)春v4.3.X <では動作しません。 springframework v 5.0.0>でのみ動作します。

1

私は同じ問題で今日も走っていて、助けを求めて頼りにしました。彼らは言った:

春データ2.xは春ブーツ2.0 M5にアップグレードするか、春データRedisの1.xの

に当分の間滞在してください春ブーツ1.xの では動作しません。 Kay-RELEASEに切り替えると、2.0.0.RELEASEの他のデータライブラリが使用され、エラーが発生すると思います。

私はspring-data-redisを1.8.7.RELEASEに切り替えた後、 spring-data-commonsを1.13.8.RELEASEに変更し、spring-data-keyvalueを1.2.8.RELEASEに変更しなければなりませんでした。

マイPOMファイルは以下のようになります。

<?xml version="1.0" encoding="UTF-8"?> 
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" 
    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> 
    <modelVersion>4.0.0</modelVersion> 

    <groupId>test</groupId> 
    <artifactId>elasticache</artifactId> 
    <version>1.0.0-SNAPSHOT</version> 
    <packaging>jar</packaging> 

    <name>elasticache</name> 
    <description>Elasticache test</description> 

    <parent> 
    <groupId>org.springframework.boot</groupId> 
    <artifactId>spring-boot-starter-parent</artifactId> 
    <version>1.5.8.RELEASE</version> 
    <relativePath/> 
    </parent> 

    <repositories> 
    <repository> 
     <id>spring-repo</id> 
     <name>Spring Repository</name> 
     <url>https://repo.spring.io/release</url> 
    </repository> 
    </repositories> 

    <dependencies> 
    <dependency> 
     <groupId>org.springframework.boot</groupId> 
     <artifactId>spring-boot-starter</artifactId> 
    </dependency> 
    <dependency> 
     <groupId>org.projectlombok</groupId> 
     <artifactId>lombok</artifactId> 
     <version>1.16.12</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.data</groupId> 
     <artifactId>spring-data-commons</artifactId> 
     <version>1.13.8.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.data</groupId> 
     <artifactId>spring-data-keyvalue</artifactId> 
     <version>1.2.8.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>org.springframework.data</groupId> 
     <artifactId>spring-data-redis</artifactId> 
     <version>1.8.7.RELEASE</version> 
    </dependency> 
    <dependency> 
     <groupId>redis.clients</groupId> 
     <artifactId>jedis</artifactId> 
     <version>2.9.0</version> 
    </dependency> 
    <dependency> 
     <groupId>com.amazonaws</groupId> 
     <artifactId>aws-java-sdk-elasticache</artifactId> 
     <version>1.11.218</version> 
    </dependency> 
    </dependencies> 

    <dependencyManagement> 
    <dependencies> 
     <dependency> 
      <groupId>org.springframework.data</groupId> 
      <artifactId>spring-data-releasetrain</artifactId> 
      <version>Kay-RELEASE</version> 
      <type>pom</type> 
      <scope>import</scope> 
     </dependency> 
    </dependencies> 
    </dependencyManagement> 

    <build> 
    <resources> 
     <resource> 
      <directory>src/main/resources</directory> 
      <filtering>true</filtering> 
     </resource> 
    </resources> 
    <extensions> 
     <extension> 
      <groupId>kr.motd.maven</groupId> 
      <artifactId>os-maven-plugin</artifactId> 
      <version>1.4.1.Final</version> 
     </extension> 
    </extensions> 
    <plugins> 
     <plugin> 
      <groupId>org.springframework.boot</groupId> 
      <artifactId>spring-boot-maven-plugin</artifactId> 
      <version>1.5.8.RELEASE</version> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-compiler-plugin</artifactId> 
      <version>3.6.0</version> 
      <configuration> 
       <source>1.8</source> 
       <target>1.8</target> 
      </configuration> 
     </plugin> 
     <plugin> 
      <groupId>org.apache.maven.plugins</groupId> 
      <artifactId>maven-surefire-plugin</artifactId> 
      <version>2.19.1</version> 
     </plugin> 
    </plugins> 
    </build> 

+0

私はスプリングブートを使用していません。最新のelasticsearchクライアントを使用するためには最新のspring-data-elasticsearchをアップグレードする必要があります – Nick

+0

その場合は、 info: https://gitter.im/spring-projects/spring-data 彼らが役に立つかもしれません。 –

関連する問題