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
{{ message }}
This repository has been archived by the owner on Feb 23, 2023. It is now read-only.
Basically a continuation of #1462, the native build still crashes when @ConfigurationProperties and @Validated annotations are placed on a record. Problem is still with proxy creation, the exception is however different than in <0.11.3
2022-03-04 09:44:12.671 INFO 89 --- [ main] o.s.n.s.SpringAnalyzer : Spring Native operating mode: native
2022-03-04 09:45:06.157 INFO 89 --- [ main] o.s.a.f.ProxyGenerator : Generating class file bytes for a proxy named xxx.ServerConfiguration$$SpringProxy$6571616c
java.lang.IllegalStateException: Cannot create a build time proxy for a final class: xxx.ServerConfiguration
at org.springframework.aop.framework.ProxyGenerator.getProxyBytes(ProxyGenerator.java:73)
at org.springframework.aot.nativex.ConfigurationContributor.generateBuildTimeClassProxy(ConfigurationContributor.java:193)
at org.springframework.aot.nativex.ConfigurationContributor.generateBuildTimeClassProxies(ConfigurationContributor.java:170)
at org.springframework.aot.nativex.ConfigurationContributor.processBuildTimeClassProxyRequests(ConfigurationContributor.java:142)
at org.springframework.aot.nativex.ConfigurationContributor.contribute(ConfigurationContributor.java:74)
at org.springframework.aot.build.BootstrapCodeGenerator.generate(BootstrapCodeGenerator.java:91)
at org.springframework.aot.build.BootstrapCodeGenerator.generate(BootstrapCodeGenerator.java:71)
at org.springframework.aot.build.GenerateBootstrapCommand.call(GenerateBootstrapCommand.java:107)
at org.springframework.aot.build.GenerateBootstrapCommand.call(GenerateBootstrapCommand.java:42)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.springframework.aot.build.GenerateBootstrapCommand.main(GenerateBootstrapCommand.java:112)
java.lang.IllegalStateException: Problem creating proxy with configuration: org.springframework.aop.framework.ProxyConfiguration@6571616c
at org.springframework.aop.framework.ProxyGenerator.getProxyBytes(ProxyGenerator.java:98)
at org.springframework.aot.nativex.ConfigurationContributor.generateBuildTimeClassProxy(ConfigurationContributor.java:193)
at org.springframework.aot.nativex.ConfigurationContributor.generateBuildTimeClassProxies(ConfigurationContributor.java:170)
at org.springframework.aot.nativex.ConfigurationContributor.processBuildTimeClassProxyRequests(ConfigurationContributor.java:142)
at org.springframework.aot.nativex.ConfigurationContributor.contribute(ConfigurationContributor.java:74)
at org.springframework.aot.build.BootstrapCodeGenerator.generate(BootstrapCodeGenerator.java:91)
at org.springframework.aot.build.BootstrapCodeGenerator.generate(BootstrapCodeGenerator.java:71)
at org.springframework.aot.build.GenerateBootstrapCommand.call(GenerateBootstrapCommand.java:107)
at org.springframework.aot.build.GenerateBootstrapCommand.call(GenerateBootstrapCommand.java:42)
at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
at picocli.CommandLine.access$1300(CommandLine.java:145)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2352)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2346)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2311)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
at picocli.CommandLine.execute(CommandLine.java:2078)
at org.springframework.aot.build.GenerateBootstrapCommand.main(GenerateBootstrapCommand.java:112)
Caused by: java.lang.IllegalStateException: Cannot create a build time proxy for a final class: xxx.ServerConfiguration
at org.springframework.aop.framework.ProxyGenerator.getProxyBytes(ProxyGenerator.java:73)
... 16 more
Nested record detection problem mentioned in #1462 has gone.
Spring Boot: 2.6.4
Spring Native: 0.11.3
GraalVM: 22.0.0.2 CE
The text was updated successfully, but these errors were encountered:
With the changes in that commit the sample project compiles fine (thanks for that) and starts.
I have not, however, added test cases around whether validation actually works in a native-image with record types, but at least the image builds now.
Basically a continuation of #1462, the native build still crashes when
@ConfigurationProperties
and@Validated
annotations are placed on a record. Problem is still with proxy creation, the exception is however different than in <0.11.3Nested record detection problem mentioned in #1462 has gone.
Spring Boot: 2.6.4
Spring Native: 0.11.3
GraalVM: 22.0.0.2 CE
The text was updated successfully, but these errors were encountered: