0

I'm getting this annoying message :

Error:(8, 8) java: name clash: save(java.lang.Iterable) in org.springframework.data.repository.CrudRepository and save(java.lang.Iterable) in org.springframework.data.jpa.repository.JpaRepository have the same erasure, yet neither overrides the other

I'm not using CrudRepository in my code, so how come im getting this weird message? How can I fix it?

Qiu
  • 5,651
  • 10
  • 49
  • 56
Soil92
  • 37
  • 2
  • 9
  • Provide the relevant code associated with this error message. – Luiggi Mendoza May 26 '15 at 12:55
  • 5
    Yes you are. `JpaRepository` <- `PagingAndSortingRepository` <- `CrudRepository`. Error looks like you are mixing wrong versions of dependencies, i.e. an older version of Spring Data Common with Spring Data JPA or a wrong java version. – M. Deinum May 26 '15 at 12:58
  • Thanks! it was a dependency issue, had a wrong Commons version, just had to change the gradle config. – Soil92 May 27 '15 at 15:11

1 Answers1

0

Its a dependency issue. The following dependency resolves the issue

  <dependency>
        <groupId>org.springframework.data</groupId>
        <artifactId>spring-data-commons-core</artifactId>
        <version>**1.2.1.RELEASE**</version>
  </dependency>