Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
3.17.0
-
None
-
Camel 3.17.0 / Spring Boot 2.6.7 / OpenJDK 64-bit Server VM 18.0.1.1+2
-
Unknown
Description
An aws2-sqs route fails to configure in Camel/Spring Boot when the camel.component.aws2-sqs.trust-all-certificates Spring property is set to true and a proxy is configured.
Consider route:
@Component
public class SqsRoute extends EndpointRouteBuilder {
@Override
public void configure() throws Exception {
from(aws2Sqs("srcQueue"))
.to(aws2Sqs("dstQueue"));
{{ }}}
}
And in application.yml:
camel:
component:
aws2-sqs:
use-default-credentials-provider: true
proxy-protocol: http
proxy-host: localhost
proxy-port: 8118
trust-all-certificates: true
springboot:
main-run-controller: true
Exception is thrown:
org.apache.camel.FailedToCreateRouteException: Failed to create route route1: Route(route1)[From[aws2-sqs://srcQueue] -> [To[aws2-sqs://ds... because of Failed to resolve endpoint: aws2-sqs://srcQueue due to: The httpClient and the httpClientBuilder can't both be configured.
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:80) ~[camel-core-reifier-3.16.0.jar:3.16.0]
at org.apache.camel.impl.DefaultModelReifierFactory.createRoute(DefaultModelReifierFactory.java:49) ~[camel-core-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:887) ~[camel-core-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.DefaultCamelContext.startRouteDefinitions(DefaultCamelContext.java:775) ~[camel-core-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2937) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.support.service.BaseService.init(BaseService.java:83) ~[camel-api-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2620) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.support.service.BaseService.start(BaseService.java:111) ~[camel-api-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2639) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:255) ~[camel-core-engine-3.16.0.jar:3.16.0]
at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:119) ~[camel-spring-3.16.0.jar:3.16.0]
at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:151) ~[camel-spring-3.16.0.jar:3.16.0]
at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:176) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:169) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:143) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:421) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:378) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:938) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:586) ~[spring-context-5.3.19.jar:5.3.19]
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:740) ~[spring-boot-2.6.7.jar:2.6.7]
at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:415) ~[spring-boot-2.6.7.jar:2.6.7]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:303) ~[spring-boot-2.6.7.jar:2.6.7]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1312) ~[spring-boot-2.6.7.jar:2.6.7]
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1301) ~[spring-boot-2.6.7.jar:2.6.7]
at org.dylanpiergies.camel.CamelApplication.main(CamelApplication.java:9) ~[main/:na]
Caused by: org.apache.camel.ResolveEndpointFailedException: Failed to resolve endpoint: aws2-sqs://srcQueue due to: The httpClient and the httpClientBuilder can't both be configured.
at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:982) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.getEndpoint(AbstractCamelContext.java:893) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.builder.endpoint.AbstractEndpointBuilder.resolve(AbstractEndpointBuilder.java:66) ~[camel-endpointdsl-3.16.0.jar:3.16.0]
at org.apache.camel.reifier.RouteReifier.doCreateRoute(RouteReifier.java:92) ~[camel-core-reifier-3.16.0.jar:3.16.0]
at org.apache.camel.reifier.RouteReifier.createRoute(RouteReifier.java:74) ~[camel-core-reifier-3.16.0.jar:3.16.0]
... 24 common frames omitted
Caused by: java.lang.IllegalArgumentException: The httpClient and the httpClientBuilder can't both be configured.
at software.amazon.awssdk.utils.Validate.isTrue(Validate.java:76) ~[utils-2.17.152.jar:na]
at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.resolveSyncHttpClient(SdkDefaultClientBuilder.java:322) ~[sdk-core-2.17.152.jar:na]
at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.finalizeSyncConfiguration(SdkDefaultClientBuilder.java:277) ~[sdk-core-2.17.152.jar:na]
at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.syncClientConfiguration(SdkDefaultClientBuilder.java:173) ~[sdk-core-2.17.152.jar:na]
at software.amazon.awssdk.services.sqs.DefaultSqsClientBuilder.buildClient(DefaultSqsClientBuilder.java:27) ~[sqs-2.17.152.jar:na]
at software.amazon.awssdk.services.sqs.DefaultSqsClientBuilder.buildClient(DefaultSqsClientBuilder.java:22) ~[sqs-2.17.152.jar:na]
at software.amazon.awssdk.core.client.builder.SdkDefaultClientBuilder.build(SdkDefaultClientBuilder.java:140) ~[sdk-core-2.17.152.jar:na]
at org.apache.camel.component.aws2.sqs.client.impl.Sqs2ClientIAMOptimized.getSQSClient(Sqs2ClientIAMOptimized.java:86) ~[camel-aws2-sqs-3.16.0.jar:3.16.0]
at org.apache.camel.component.aws2.sqs.Sqs2Endpoint.doInit(Sqs2Endpoint.java:145) ~[camel-aws2-sqs-3.16.0.jar:3.16.0]
at org.apache.camel.support.service.BaseService.init(BaseService.java:83) ~[camel-api-3.16.0.jar:3.16.0]
at org.apache.camel.support.service.ServiceHelper.initService(ServiceHelper.java:84) ~[camel-api-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.internalAddService(AbstractCamelContext.java:1544) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.addService(AbstractCamelContext.java:1489) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.addService(AbstractCamelContext.java:1484) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.addService(AbstractCamelContext.java:1479) ~[camel-base-engine-3.16.0.jar:3.16.0]
at org.apache.camel.impl.engine.AbstractCamelContext.doGetEndpoint(AbstractCamelContext.java:966) ~[camel-base-engine-3.16.0.jar:3.16.0]
... 28 common frames omitted
Attachments
Issue Links
- links to