[
https://issues.apache.org/jira/browse/CAMEL-19353?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17722797#comment-17722797
]
Claus Ibsen commented on CAMEL-19353:
-------------------------------------
public static HttpClient.Factory getHttpClientFactory() {
HttpClient.Factory factory = getFactory(
ServiceLoader.load(HttpClient.Factory.class,
Thread.currentThread().getContextClassLoader()));
if (factory == null) {
factory = getFactory(ServiceLoader.load(HttpClient.Factory.class,
HttpClientUtils.class.getClassLoader()));
if (factory == null) {
throw new KubernetesClientException(
"No httpclient implementations found on the context classloader,
please ensure your classpath includes an implementation jar");
}
}
LOGGER.debug("Using httpclient {} factory", factory.getClass().getName());
return factory;
}
> Camel-Jbang reload exception
> ----------------------------
>
> Key: CAMEL-19353
> URL: https://issues.apache.org/jira/browse/CAMEL-19353
> Project: Camel
> Issue Type: Improvement
> Components: camel-jbang
> Affects Versions: 3.21.0
> Reporter: Marat Gubaidullin
> Assignee: Claus Ibsen
> Priority: Minor
> Fix For: 3.21.0, 4.0-RC1, 4.0
>
>
> When I run the following route with camel-jbang:
> {code:java}
> - route:
> id: route-1791
> from:
> uri: kamelet:mqtt5-source
> id: from-fac9
> parameters:
> topic: data
> brokerUrl: '{{configmap:mqtt-server/broker-uri}}'
> username: '{{secret:mqtt-connection/username}}'
> password: '{{secret:mqtt-connection/password}}'
> clientId: client1
> steps:
> - log:
> message: ${body}
> id: log-cfb7
> {code}
> I have correct error message
> {code:java}
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route-1791: Route(route-1791)[From[kamelet:mqtt5-source?brokerUrl={{conf...
> because of Failed to resolve endpoint:
> kamelet:mqtt5-source?brokerUrl={{configmap:mqtt-server/broker-uri}}&clientId=xxxxxx&password=xxxxxx&topic=data&username=xxxxxx
> due to: Operation: [get] for kind: [ConfigMap] with name: [mqtt-server]
> in namespace: [karavan] failed.
> {code}
> When I run camel-jbang with empty --source-dir and then upload and run the
> same YAML I have an unexplainable message:
> {code:java}
> 2023-05-15 09:05:24.041 WARN 54202 --- [ntloop-thread-0]
> support.RouteOnDemandReloadStrategy : Error reloading routes due Failed to
> create route route-1791:
> Route(route-1791)[From[kamelet:mqtt5-source?brokerUrl={{conf... because of
> Failed to resolve endpoint:
> kamelet:mqtt5-source?brokerUrl={{configmap:mqtt-server/broker-uri}}&clientId=xxxxxx&password=xxxxxx&topic=data&username=xxxxxx
> due to: No httpclient implementations found on the context classloader,
> please ensure your classpath includes an implementation jar. This exception
> is ignored.
> org.apache.camel.FailedToCreateRouteException: Failed to create route
> route-1791: Route(route-1791)[From[kamelet:mqtt5-source?brokerUrl={{conf...
> because of Failed to resolve endpoint:
> kamelet:mqtt5-source?brokerUrl={{configmap:mqtt-server/broker-uri}}&clientId=xxxxxx&password=xxxxxx&topic=data&username=xxxxxx
> due to: No httpclient implementations found on the context classloader,
> please ensure your classpath includes an implementation jar
> {code}
--
This message was sent by Atlassian Jira
(v8.20.10#820010)