Skip to content

Proxy hint missing when AliasFor is used on the annotation itself #28528

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

Closed
snicoll opened this issue May 26, 2022 · 0 comments
Closed

Proxy hint missing when AliasFor is used on the annotation itself #28528

snicoll opened this issue May 26, 2022 · 0 comments
Assignees
Labels
theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Milestone

Comments

@snicoll
Copy link
Member

snicoll commented May 26, 2022

RuntimeHintsUtils#registerAnnotation will not register a proxy hint for an annotation using @AliasFor against a local attribute. This leads to issues in a native environment:

Caused by: com.oracle.svm.core.jdk.UnsupportedFeatureError: Proxy class defined by interfaces [interface org.springframework.web.bind.annotation.RequestMapping, interface org.springframework.core.annotation.SynthesizedAnnotation] not found. Generating proxy classes at runtime is not supported. Proxy classes need to be defined at image build time by specifying the list of interfaces that they implement. To define proxy classes use -H:DynamicProxyConfigurationFiles=<comma-separated-config-files> and -H:DynamicProxyConfigurationResources=<comma-separated-config-resources> options.
@snicoll snicoll added type: bug A general bug theme: aot An issue related to Ahead-of-time processing labels May 26, 2022
@snicoll snicoll added this to the 6.0.0-M5 milestone May 26, 2022
@snicoll snicoll self-assigned this May 26, 2022
philwebb added a commit that referenced this issue May 27, 2022
Update `RuntimeHintsUtils` to skip `@Reflective` annotations when
checking for `@AliasFor`. Since the `@Reflective` annotation is only
used at AOT processing time, we shouldn't need a hint for it.

See gh-28528
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
theme: aot An issue related to Ahead-of-time processing type: bug A general bug
Projects
None yet
Development

No branches or pull requests

1 participant