So I'm using Gradle, Eclipse, Java 11, Spring Boot with some Spring Data JPA repositories.
In Eclipse, I've tested with 3 different JDK libraries configured in the build path and in the execution: OpenJDK, OracleJDK and GraalVM.
I get the same error every time:
Caused by: java.lang.IllegalArgumentException: Either use @Param on all parameters except Pageable and Sort typed once, or none at all!
Because of a line like:
@Query("select e from Entity e where e.value = :value")
Optional<Entity> findByValue(String value);
Guaranteed to work would be to add @Param("value")
for the parameter, but I don't want to do that because this project has a lot of repositories.
If I run this under the command line ./gradlew bootRun
where I set one of the JDKs, this error does not occur.
If I try to reproduce this under a new project, but under Maven where I set the properties for java and maven for Java 11, then it works just fine under Eclipse.
The Gradle project works fine under a IntelliJ IDEA.
Can someone please help in explaining why this is happening? Does Eclipse bode well with Maven but not with Gradle? I can't fine an explanation.