aws / aws-sdk-java-v2

The official AWS SDK for Java - Version 2
Apache License 2.0
2.16k stars 833 forks source link

GraalVM native image support tries to register missing class for reflection #5552

Closed DSkoufis closed 1 week ago

DSkoufis commented 1 week ago

Describe the bug

The core/sdk-core/src/main/resources/META-INF/native-image/software.amazon.awssdk/sdk-core/reflect-config.json tries to register the software.amazon.awssdk.core.internal.interceptor.HttpChecksumRequiredInterceptor class for reflection.

But that class was removed in https://github.com/aws/aws-sdk-java-v2/pull/4174

Expected Behavior

Shouldn't get the warning

Current Behavior

Warning: Could not resolve class software.amazon.awssdk.core.internal.interceptor.HttpChecksumRequiredInterceptor for reflection configuration. Reason: java.lang.ClassNotFoundException: software.amazon.awssdk.core.internal.interceptor.HttpChecksumRequiredInterceptor.
Warning: Method io.quarkus.runtime.configuration.DurationConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.MemorySizeConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.InetSocketAddressConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.CharsetConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.CidrAddressConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.InetAddressConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.RegexConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.PathConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.LocaleConverter.provider() not found.
Warning: Method io.quarkus.runtime.configuration.ZoneIdConverter.provider() not found.
Warning: Method io.quarkus.runtime.logging.LevelConverter.provider() not found.
Warning: Method io.quarkus.amazon.common.runtime.RegionConverter.provider() not found.
Warning: Method io.quarkus.opentelemetry.runtime.config.HierarchicalOTelConnectionConfigInterceptor.provider() not found.
Warning: Method io.quarkus.rest.client.reactive.runtime.RestClientReactiveConfigFallbackInterceptor.provider() not found.
Warning: Method io.quarkus.rest.client.reactive.runtime.RestClientReactiveConfigRelocateInterceptor.provider() not found.
Warning: Method io.quarkus.resteasy.reactive.common.runtime.ResteasyReactiveConfigFallbackInterceptor.provider() not found.
Warning: Method io.quarkus.resteasy.reactive.common.runtime.ResteasyReactiveConfigRelocateInterceptor.provider() not found.
Warning: Method io.quarkus.restclient.config.RestClientFallbackConfigSourceInterceptor.provider() not found.
Warning: Method io.quarkus.opentelemetry.runtime.config.MpTelemetryRelocateConfigSourceInterceptor.provider() not found.
Warning: Method sun.security.provider.NativePRNG.<init>(SecureRandomParameters) not found.
Warning: Method io.smallrye.config.SmallRyeConfigProviderResolver.provider() not found.
Warning: Method io.quarkus.jaxrs.client.reactive.runtime.ClientResponseBuilderFactory.provider() not found.
Warning: Method org.jboss.resteasy.reactive.client.impl.ClientBuilderImpl.provider() not found.
Warning: Method io.quarkus.rest.client.reactive.runtime.spi.JsonMissingMessageBodyReaderErrorMessageContextualizer.provider() not found.
Warning: Method io.quarkus.rest.client.reactive.runtime.spi.XmlMissingMessageBodyReaderErrorMessageContextualizer.provider() not found.
Warning: Method io.quarkus.bootstrap.logging.InitialConfigurator.provider() not found.
Warning: Method io.quarkus.stork.StorkConfigProvider.provider() not found.
Warning: Method org.jboss.resteasy.reactive.client.impl.SseEventSourceBuilderImpl.provider() not found.
Warning: Method org.jboss.resteasy.reactive.common.jaxrs.RuntimeDelegateImpl.provider() not found.
Warning: Method io.smallrye.stork.impl.RoundRobinLoadBalancerProviderLoader.provider() not found.
Warning: Method io.confluent.kafka.schemaregistry.client.security.basicauth.SaslBasicAuthCredentialProvider.provider() not found.
Warning: Method io.confluent.kafka.schemaregistry.client.security.basicauth.UrlBasicAuthCredentialProvider.provider() not found.
Warning: Method io.confluent.kafka.schemaregistry.client.security.basicauth.UserInfoCredentialProvider.provider() not found.
Warning: Method software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService.provider() not found.

Reproduction Steps

I've encountered a warning while building a native image in Quarkus and tracked this down to this config. It's not breaking the build and seemingly it's still working fine, but we get an exception in the build logs (see below)

We've been using Quarkus to build the native image using AWS SDK - through the Quarkus Amazon Services

We've found this while using its SFN extension and compiling to native

Possible Solution

No response

Additional Information/Context

The extension uses 2.27.0 version but that file also exists in [the currently latest] 2.27.18

AWS Java SDK version used

2.27.0

JDK version used

OpenJDK 64-Bit Server VM GraalVM CE 17.0.9+9.1

Operating System and version

macOS 14.6.1

debora-ito commented 1 week ago

@DSkoufis thank you for the report, marking this as a bug.

github-actions[bot] commented 1 week ago

This issue is now closed. Comments on closed issues are hard for our team to see. If you need more assistance, please open a new issue that references this one.