Getting "The EntityGraph-Feature requires at least a JPA 2.1 persistence provider" error with Spring Boot 3.0.0-RC1
gtiwari333 opened this issue · comments
See this: https://github.com/gtiwari333/spring-native-error
I've a simple setup with latest Spring Boot 3.0.0.RC1 where im using EntityGraph
and getting a runtime error as following from the native image:
org.springframework.dao.InvalidDataAccessApiUsageException: The EntityGraph-Feature requires at least a JPA 2.1 persistence provider
Code:
@EntityGraph(attributePaths = {"comments"})
List<Note> findAll();
I'm using GraalVM CE 22.2.0.
~/Downloads/demo$ java -version
openjdk version "17.0.4" 2022-07-19
OpenJDK Runtime Environment GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06)
OpenJDK 64-Bit Server VM GraalVM CE 22.2.0 (build 17.0.4+8-jvmci-22.2-b06, mixed mode, sharing)
I noticed there was a similar issue opened in past (now closed) #1619.
First please notice Spring Boot 3 requires GraalVM 22.3, it seems you tested with 22.2 so please upgrade by downloading it from https://bell-sw.com/pages/downloads/native-image-kit/#/nik-22-17-ea or SDKman.
This issue tracker is for Spring Native experimental project. If you still see the error with GraalVM 22.3, I guess you should raise it on https://github.com/spring-projects/spring-data-jpa by mentioning 942d4dc, we will then add the related entry on metadata repository cc @christophstrobl @mhalbritter.