New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Missing proxy declaration for native-image when using Spring Data JPA #30937
Comments
It's unclear to me why The hibernate enhance plugin has not been applied to the reproducer so that's one step you should take before going any further. Please fix the reproducer to use it (check start.spring.io with JPA and GraalVM for an example if necessary). |
I have updated the reproducer. |
Thanks. These are hibernate metadata so I am afraid there's not much we can do. This looks like a duplicate of oracle/graalvm-reachability-metadata#324 |
I had the same issue after upgrading to SpringBoot v3.1.2, only one of my services calling a specific repo was throwing that exception, I managed to solve ( while waiting for hibernate metadata ) by adding @transactional(readOnly = true) on that service since it was the only one out of transaction. |
It turns out this was actually a: |
Affects: Spring 6.0.11 / Spring Boot 3.1.2
Assume an application with the following components:
Let this application have a controller with an endpoint accepting a
MultipartFile
that calls an@Transactional
method. This controller just needs to exist, it does not need to be called.The application has an entity with a
String
field (@Id
) and a correspondingCrudRepository
with agetBy<attribute name>
method that is executed in a@SpringBootTest
.When running the tests of this application with
native-image
, an error like the following occurs:Reproducer: https://github.com/danthe1st/spring-proxy-missing-repro
Build logs with error: https://github.com/danthe1st/spring-proxy-missing-repro/actions/runs/5647960364/job/15299138251
The text was updated successfully, but these errors were encountered: