0
votes

I tried upgrading a Spring Boot application from spring-data-redis 1.6.4.RELEASE to 1.7.2.RELEASE by adding the spring-data-redis dependency to the POM whilst leaving the spring-boot-starter-redis unchanged (using Spring Boot 1.3.5.RELEASE). The upgraded application fails to start with this error:

Caused by: java.lang.AbstractMethodError: org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(Ljava/lang/reflect/Method;Lorg/springframework/data/repository/core/RepositoryMetadata;Lorg/springframework/data/projection/ProjectionFactory;Lorg/springframework/data/repository/core/NamedQueries;)Lorg/springframework/data/repository/query/RepositoryQuery;

A bit cryptic.

1
Can you share the stack trace of the AbstractMethodError?Andy Wilkinson
please see linkuser3380516
I'd really appreciate any help or suggestions with this. I need some features that were introduced in spring-data-redis 1.7.x (@RedisHash for example).user3380516

1 Answers

0
votes

You need to upgrade all of Spring Data, not just Spring Data Redis. By just overriding the version of Spring Data Redis you're left with an incompatible version of Spring Data Commons.

As you are using Spring Boot, you should override the version of the spring-data-releasetrain.version property to Hopper-SR2:

<properties>
    <spring-data-releasetrain.version>Hopper-SR2</spring-data-releasetrain.version>
</properties>

and remove the version from any Spring Data-related dependencies you have declared so that Boot's dependency management can keep them all aligned.