-
Notifications
You must be signed in to change notification settings - Fork 38.4k
Class Proxy not working with native-image #28729
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
Comments
@marcusdacoregio, why are you registering both a JDK and a Class proxy in the What happens if you delete line 107 ( |
Hi @sbrannen, if I remove that line the error changes to this:
|
Thanks for trying it out and reporting back. Both of the errors point to the same underlying issue. The first error tells us that you got back a dynamic proxy instead of class-based proxy. The second error tells us that a dynamic proxy could not be created for the interfaces
I have not debugged your application, but both of these errors point to Specifically, if In summary, I think this is effectively a duplicate of #28115, but I will leave it open for @jhoeller to assess once he addresses #28115. |
@marcusdacoregio please subscribe to #28115 and try again when it's fixed. If it turns out to be another issue, we can always reopen this one. |
I am adding support for the
@PreAuthorize
,@PreFilter
,@PostAuthorize
, and@PostFilter
annotations from Spring Security.The hints are being added using a
PrePostSecuredBeanRegistrationAotProcessor
andPrePostSecuredBeanRegistrationAotContribution
, which can be seen here, that's pretty much what we had before in the native repository.However, the application fails when running on native with the following stacktrace:
It runs fine in AOT only.
To Reproduce:
Run the
build.sh
script from this sample.The text was updated successfully, but these errors were encountered: