-
Notifications
You must be signed in to change notification settings - Fork 38.3k
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
Field PROPAGATION_REQUIRED
not found in class TransactionDefinition
in native image
#28688
Comments
RuntimeHintsUtils.registerAnnotation(hints, org.springframework.transaction.annotation.Transactional.class);
hints.reflection()
.registerTypes(asList(
TypeReference.of(org.springframework.transaction.annotation.Isolation.class),
TypeReference.of(org.springframework.transaction.annotation.Propagation.class),
TypeReference.of(org.springframework.transaction.TransactionDefinition.class)),
hint -> ...)
hints.reflection()
.registerTypes(asList(
TypeReference.of(AutoProxyRegistrar.class),
TypeReference.of(ProxyTransactionManagementConfiguration.class),
TypeReference.of("org.springframework.transaction.interceptor.BeanFactoryTransactionAttributeSourceAdvisor$1")), ... (updated to make use of RuntimeHintsUtils.registerAnnotation) |
@christophstrobl Thanks for the hints ;-) What about annotating |
Please don't register proxies like that, and use registerAnnotation. |
PROPAGATION_REQUIRED
not found in class TransactionDefinition
in native image
@christophstrobl, do you recall why you needed to register reflection hints for the enum constant fields in I'm asking, because while working on #30854 I wondered if we still need those hints. |
@sdeleuze, Christoph informed me that he does not recall. Do you recall? |
I don't, but if we change something here, worth to check if we have a related smoke test and check after that it does not break. In any case, I would advise to test on a sample with both 22.3 and 23.0 GraalVM releases. |
In the
batch
sample fromspring-native
insb-3.0.x
branch, running the native image fails with the following exception:I guess there are some hints missing.
The text was updated successfully, but these errors were encountered: