-
Notifications
You must be signed in to change notification settings - Fork 853
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
ClassNotFoundException after Spring Boot Native Image compilation for s3/internal/ApplyUserAgentInterceptor.java #5127
Comments
Same goes for Edit: I created an issue in AWS CRT for this. |
@klopfdreh acknowledged, marking as a bug. |
Hey @debora-ito maybe it would be a good idea to introduce the native support to the code as in Edit: Saw that those classes are Spring related and can't be used in the SDK. Sorry for the noise. |
This issue is now closed. Comments on closed issues are hard for our team to see. |
Describe the bug
The
reflect-config.json
is missing in thes3
forservices-custom/s3-transfer-manager/src/main/java/software/amazon/awssdk/transfer/s3/internal/ApplyUserAgentInterceptor.java
which causes the Spring Boot Native build to throw a java.lang.ClassNotFoundExceptionExpected Behavior
When the
reflect-config.json
is added like in other packages and it is added via-H:ReflectionConfigurationResources
to the native build, nojava.lang.ClassNotFoundException
is going to occur anymore.Current Behavior
There is a
java.lang.ClassNotFoundException
during the runtime as the class ApplyUserAgentInterceptor.java can not be loaded JIT in a native image.Reproduction Steps
Native compile a Spring Boot application like described here: https://aws.amazon.com/de/blogs/developer/graalvm-native-image-support-in-the-aws-sdk-for-java-2-x/ - note: the
-H:ReflectionConfigurationResources=META-INF/native-image/software.amazon.awssdk/s3/reflect-config.json
is not working anymore as it is missing.Possible Solution
Add the
reflect-config.json
to the s3 package with the following content.[ { "name": "software.amazon.awssdk.transfer.s3.internal.ApplyUserAgentInterceptor", "methods": [ { "name": "<init>", "parameterTypes": [] } ] } ]
Additional Information/Context
N/A
AWS Java SDK version used
2.25.34
JDK version used
jdk17.0.10
Operating System and version
linux / ubi9-minimal:9.3-1612
The text was updated successfully, but these errors were encountered: