2017-10-25 1 views
2

릴리스 트레인을 봄 데이터의 Kay-RELEASE으로 업그레이드 한 후 다음 예외가 발생되기 시작했습니다. 스프링 데이터 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) 

두 번 모두 항아리 종속성을 확인하고 둘 항아리의 중복이나 다른 버전이 존재가 남아 있지 않습니다. 나는 스프링을 사용하고있다 4.3.12.RELEASE

답변

2

스프링 데이터 케이-RELEASE (일명 2.0.0). springframework v 5.0.0>에서만 작동합니다.

1

나는 오늘도 같은 문제로 달렸고, Gitter에게 도움을 요청했다. 그들은 말했다 :

봄 데이터 2.x에서 봄 부팅 1.x에서 작동하지 않습니다 스프링 부팅 2.0 M5를 업그레이드하거나 시간이 스프링 데이터 레디 스 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 파일은 지금 : 봄 v4.3.X < 작동하지 않습니다

<?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

당신의 제안에 감사드립니다. @Wilfred .. 저는 스프링 부트를 사용하지 않고 spring-data-elasticsearch를 최신 버전으로 업그레이드하는 것이 최신 elasticsearch 클라이언트를 사용하기위한 요구 사항입니다. – Nick

+0

그럴 경우 더 많은 정보를 얻을 수 있습니다 info : https://gitter.im/spring-projects/spring-data 그들은 도움을 줄 수 있습니다. –

관련 문제