0

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 Answers1

0

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.

Andy Wilkinson
  • 108,729
  • 24
  • 257
  • 242