-
Notifications
You must be signed in to change notification settings - Fork 3k
Description
After working around a couple minor issues (ie included and setting the HTTP client) it appears that there is still an issue when trying to leverage the AWS S3 client 2.x SDK in Quarkus Native
Expected behavior
When leveraging the S3 client:
SdkHttpClient httpClient = ApacheHttpClient.builder(). maxConnections(50). build(); S3Client.builder().httpClient(httpClient).build();
I would expect to get a successfully created client to run commands against S3.
Actual behavior
During creation I am getting the following error:
Caused by: java.lang.RuntimeException: Unexpected error: java.security.InvalidAlgorithmParameterException: the trustAnchors parameter must be non-empty at sun.security.validator.PKIXValidator.<init>(PKIXValidator.java:89) at sun.security.validator.Validator.getInstance(Validator.java:181) at sun.security.ssl.X509TrustManagerImpl.getValidator(X509TrustManagerImpl.java:300) at sun.security.ssl.X509TrustManagerImpl.checkTrustedInit(X509TrustManagerImpl.java:176) at sun.security.ssl.X509TrustManagerImpl.checkTrusted(X509TrustManagerImpl.java:189) at sun.security.ssl.X509TrustManagerImpl.checkServerTrusted(X509TrustManagerImpl.java:129) at sun.security.ssl.CertificateMessage$T12CertificateConsumer.checkServerCerts(CertificateMessage.java:625) at sun.security.ssl.CertificateMessage$T12CertificateConsumer.onCertificate(CertificateMessage.java:460) at sun.security.ssl.CertificateMessage$T12CertificateConsumer.consume(CertificateMessage.java:360) at sun.security.ssl.SSLHandshake.consume(SSLHandshake.java:392) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:443) at sun.security.ssl.HandshakeContext.dispatch(HandshakeContext.java:421) at sun.security.ssl.TransportContext.dispatch(TransportContext.java:177) at sun.security.ssl.SSLTransport.decode(SSLTransport.java:164) at sun.security.ssl.SSLSocketImpl.decode(SSLSocketImpl.java:1151) at sun.security.ssl.SSLSocketImpl.readHandshakeRecord(SSLSocketImpl.java:1062) at sun.security.ssl.SSLSocketImpl.startHandshake(SSLSocketImpl.java:402) ... 60 more
To Reproduce
Steps to reproduce the behavior:
- Create a lambda quarkus project
- Including the following dependencies:
<dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>s3</artifactId> </dependency> <dependency> <groupId>software.amazon.awssdk</groupId> <artifactId>apache-client</artifactId> </dependency> - Create a dynamic-proxies.json with the following:
[ ["org.apache.http.conn.HttpClientConnectionManager", "org.apache.http.pool.ConnPoolControl","software.amazon.awssdk.http.apache.internal.conn.Wrapped"] ] - Create a simple function that tries to connect to S3:
SdkHttpClient httpClient = ApacheHttpClient.builder(). maxConnections(50). build(); S3Client.builder().httpClient(httpClient).build(); - Run a mvn clean package -Pnative
- Run the lambda function leveraging SAM
Configuration
# Add your application.properties here, if applicable.
`quarkus.native.additional-build-args =-H:DynamicProxyConfigurationResources=dynamic-proxies.json`
**Screenshots**
(If applicable, add screenshots to help explain your problem.)
**Environment (please complete the following information):**
- Output of `uname -a` or `ver`:
- Output of `java -version`:
- GraalVM version (if different from Java): 19.3.1
- Quarkus version or git rev: 1.2.0.final
- Build tool (ie. output of `mvnw --version` or `gradlew --version`):
Apache Maven 3.6.0 (97c98ec64a1fdfee7767ce5ffb20918da4f719f3; 2018-10-24T14:41:47-04:00)
Maven home: /Users/weissmi/apps/apache-maven-3.6.0
Java version: 11.0.1, vendor: Oracle Corporation, runtime: /Library/Java/JavaVirtualMachines/openjdk-11.0.1.jdk/Contents/Home
Default locale: en_US, platform encoding: UTF-8
OS name: "mac os x", version: "10.15.3", arch: "x86_64", family: "mac"
**Additional context**
(Add any other context about the problem here.)