-
Notifications
You must be signed in to change notification settings - Fork 3.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
native image fails with java.lang.ClassNotFoundException #2802
Comments
The issue still persists with the newest |
Not really a gateway native issue, but spring security isn't it? |
Yes, should probably be opened in Spring Security instead. |
Are you guys able to move the issue or should I re-open it at Spring Security? |
We can't move it across GitHub orgs. You'll need to open a new issue. Thanks |
@spencergibb Since I have the same issue (new project created from initialz, only cloud gateway + security + graalvm), and guys from spring-security-ticket sent @cmdjulian back there, can you take a look? I do not need oauth, but it looks like required. I even explicit excluded every oauth lib from cloud's dependencies, did not help. And my spring-security project for authorization does not fail during the native build, it also does not use oauth2. I suppose the problem lies there: GatewayReactiveOAuth2AutoConfiguration but no idea why since it should be erased on the aot processing level after autoconfiguration introspection I also excluded ... ... the ... |
@OlgaMaciaszek if you would build a native image, you may encounter also issues with Just a side note, right now it fails with that missing |
Thanks, @cmdjulian, @Azbesciak. Working on the hint registration issue. The |
Was able to reproduce. It's a bug, caused by https://github.com/spring-cloud/spring-cloud-gateway/blob/1cd938e4486faff9dcfad4af[…]loud/gateway/config/ConfigurableHintsRegistrationProcessor.java. Will provide a fix. |
Describe the bug
When you create a Spring Boot 3 application with Spring Cloud Gateway from
2022.0.0-RC2
and include Spring Security and try to generate a native image it fails with:Sample
I created a Kotlin based sample application to show case the problem at https://github.com/cmdjulian/spring-cloud-gateway-bugs/tree/native-image-spring-security-bug. You can checkout the branch
native-image-spring-security-bug
. I used./gradlew nativeCompile
with liberica 22.3.r17-nik.The text was updated successfully, but these errors were encountered: