Skip to content
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 build failing using SES and url http client #3745

Closed
nparfait opened this issue Apr 23, 2022 · 3 comments
Closed

Native image build failing using SES and url http client #3745

nparfait opened this issue Apr 23, 2022 · 3 comments

Comments

@nparfait
Copy link

nparfait commented Apr 23, 2022

Issue
I was successfully building a native image using camel-quarkus (consuming from kafka and publishing to aws2 ses and sns) using apache client. This was working ok till I deployed to our EKS cluster using IRSA. I then included the STS module and got past the webidentitytokens issue. However this was failing intermittently with invalid security token when running as a native image (working fine in jvm mode).

I then tried to switch to url http client, with software.amazon.awssdk.http.service.impl=software.amazon.awssdk.http.urlconnection.UrlConnectionSdkHttpService

Actual Behaviour
JVM version builds and runs ok.
Native build is now failing with below error

Expected Behaviour
Native build completes. (Not sure what seeing i need to be using otherwise)

Quarkus Version:
2.8.1.Final

GraalVM version:
openjdk version "17.0.2" 2022-01-18
OpenJDK Runtime Environment GraalVM CE 22.0.0.2 (build 17.0.2+8-jvmci-22.0-b05)
OpenJDK 64-Bit Server VM GraalVM CE 22.0.0.2 (build 17.0.2+8-jvmci-22.0-b05, mixed mode, sharing)

Error Message
[ERROR] Failed to execute goal io.quarkus.platform:quarkus-maven-plugin:2.8.1.Final:build (default) on project correspondence-service: Failed to build quarkus application: io.quarkus.builder.BuildException: Build failure: Build failed due to errors
[ERROR] [error]: Build step org.apache.camel.quarkus.component.aws.commons.deployment.AwsCommonsProcessor#client threw an exception: javax.enterprise.inject.spi.DeploymentException: Missing 'software.amazon.awssdk:apache-client' dependency on the classpath
[ERROR] at org.apache.camel.quarkus.component.aws.commons.deployment.AwsCommonsProcessor.checkClasspath(AwsCommonsProcessor.java:61)
[ERROR] at org.apache.camel.quarkus.component.aws.commons.deployment.AwsCommonsProcessor.client(AwsCommonsProcessor.java:51)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[ERROR] at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:77)
[ERROR] at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
[ERROR] at java.base/java.lang.reflect.Method.invoke(Method.java:568)
[ERROR] at io.quarkus.deployment.ExtensionLoader$3.execute(ExtensionLoader.java:925)
[ERROR] at io.quarkus.builder.BuildContext.run(BuildContext.java:277)
[ERROR] at org.jboss.threads.ContextHandler$1.runWith(ContextHandler.java:18)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$Task.run(EnhancedQueueExecutor.java:2449)
[ERROR] at org.jboss.threads.EnhancedQueueExecutor$ThreadBody.run(EnhancedQueueExecutor.java:1478)
[ERROR] at java.base/java.lang.Thread.run(Thread.java:833)
[ERROR] at org.jboss.threads.JBossThread.run(JBossThread.java:501)

@jamesnetherton
Copy link
Contributor

Seems we mandate usage of the Apache HTTP client:

https://camel.apache.org/camel-quarkus/2.8.x/reference/extensions/aws2-ses.html#_additional_camel_quarkus_configuration

I'm not familiar with the background as to why that is. Maybe @ppalaga or @JiriOndrusek knows?

@nparfait
Copy link
Author

Closing as I have it now working with the apache client

@oscerd
Copy link
Contributor

oscerd commented Apr 27, 2022

In all the AWS component we are using only apache http client. The netty side is for async client and we are not supporting them for the moment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants