You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Latest Spring Boot (3.2.4) and Spring (6.1.5) AOT doesn't work for native image.
Config:
Spring Boot 3.2.4
Spring 6.1.5
GraalVM CE 21.0.2
native-maven-plugin 0.10.1
If I uncomment Transactional annotation in CheckRolesLdapAuthenticationProvider (see reproducer) I got the following:
Caused by: java.lang.UnsupportedOperationException: CGLIB runtime enhancement not supported on native image. Make sure to include a pre-generated class on the classpath instead: io.imi.aot_test.auth.CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$1
at org.springframework.cglib.core.AbstractClassGenerator.generate(AbstractClassGenerator.java:363) ~[aot_test:6.1.5]
at org.springframework.cglib.proxy.Enhancer.generate(Enhancer.java:575) ~[na:na]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.lambda$new$1(AbstractClassGenerator.java:107) ~[na:na]
at org.springframework.cglib.core.internal.LoadingCache.lambda$createEntry$1(LoadingCache.java:52) ~[na:na]
at [email protected]/java.util.concurrent.FutureTask.run(FutureTask.java:317) ~[aot_test:na]
at org.springframework.cglib.core.internal.LoadingCache.createEntry(LoadingCache.java:57) ~[na:na]
at org.springframework.cglib.core.internal.LoadingCache.get(LoadingCache.java:34) ~[na:na]
at org.springframework.cglib.core.AbstractClassGenerator$ClassLoaderData.get(AbstractClassGenerator.java:130) ~[na:na]
at org.springframework.cglib.core.AbstractClassGenerator.create(AbstractClassGenerator.java:317) ~[aot_test:6.1.5]
at org.springframework.cglib.proxy.Enhancer.createHelper(Enhancer.java:562) ~[na:na]
at org.springframework.cglib.proxy.Enhancer.createClass(Enhancer.java:407) ~[na:na]
at org.springframework.aop.framework.ObjenesisCglibAopProxy.createProxyClassAndInstance(ObjenesisCglibAopProxy.java:62) ~[na:na]
at org.springframework.aop.framework.CglibAopProxy.buildProxy(CglibAopProxy.java:218) ~[aot_test:6.1.5]
... 79 common frames omitted
There are 2 classes generated CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$0 and CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$1 which we could find in both reflection-config.json/predefined-classes-config.json which I suppose is wrong.
There is no error without Transactional. It could be a dup of this one #30939 but it's marked as closed so I'm confused.
Thanks for the report and the sample, but please report this against the Spring Security project as org.springframework.security.config.annotation.configuration.AutowireBeanFactoryObjectPostProcessor is the component that's triggering the creation of a CGLIB proxy. When you do, please ping me or add a link to the issue here so that I can follow along.
Latest Spring Boot (3.2.4) and Spring (6.1.5) AOT doesn't work for native image.
Config:
If I uncomment Transactional annotation in CheckRolesLdapAuthenticationProvider (see reproducer) I got the following:
Full log: aot-error.log
There are 2 classes generated CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$0 and CheckRolesLdapAuthenticationProvider$$SpringCGLIB$$1 which we could find in both reflection-config.json/predefined-classes-config.json which I suppose is wrong.
There is no error without Transactional. It could be a dup of this one #30939 but it's marked as closed so I'm confused.
Reproducer: https://github.com/nnl-1/SpringBoot3AotTransactionalReproducer
Thank you!
The text was updated successfully, but these errors were encountered: