[ 
https://issues.apache.org/jira/browse/CAMEL-22936?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18055440#comment-18055440
 ] 

Michael Kroll commented on CAMEL-22936:
---------------------------------------

Will do.

Oh and this is the complete stacktrace, just for documentation:
{code}
12:45:57.161 [http-nio-8081-exec-3] WARN  
o.a.c.s.b.a.h.CamelHealthCheckIndicator Health check failed  
java.lang.IllegalArgumentException: 'value' must not be null 
        at org.springframework.util.Assert.notNull(Assert.java:181) 
        at 
org.springframework.boot.actuate.health.Health$Builder.withDetail(Health.java:247)
 
        at 
org.apache.camel.spring.boot.actuate.health.CamelHealthHelper.lambda$applyHealthDetail$1(CamelHealthHelper.java:63)
 
        at java.base/java.util.Optional.ifPresent(Optional.java:178) 
        at 
org.apache.camel.spring.boot.actuate.health.CamelHealthHelper.applyHealthDetail(CamelHealthHelper.java:62)
 
        at 
org.apache.camel.spring.boot.actuate.health.CamelHealthCheckIndicator.doHealthCheck(CamelHealthCheckIndicator.java:65)
 
        at 
org.springframework.boot.actuate.health.AbstractHealthIndicator.health(AbstractHealthIndicator.java:82)
 
        at 
org.springframework.boot.actuate.health.HealthIndicator.getHealth(HealthIndicator.java:37)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointWebExtension.getHealth(HealthEndpointWebExtension.java:94)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointWebExtension.getHealth(HealthEndpointWebExtension.java:47)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointSupport.getLoggedHealth(HealthEndpointSupport.java:172)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointSupport.getContribution(HealthEndpointSupport.java:145)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:110)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointSupport.getHealth(HealthEndpointSupport.java:81)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(HealthEndpointWebExtension.java:80)
 
        at 
org.springframework.boot.actuate.health.HealthEndpointWebExtension.health(HealthEndpointWebExtension.java:75)
        at 
org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:281) 
        at 
org.springframework.boot.actuate.endpoint.invoke.reflect.ReflectiveOperationInvoker.invoke(ReflectiveOperationInvoker.java:74)
 
        at 
org.springframework.boot.actuate.endpoint.annotation.AbstractDiscoveredOperation.invoke(AbstractDiscoveredOperation.java:60)
 
        at 
org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$ServletWebOperationAdapter.handle(AbstractWebMvcEndpointHandlerMapping.java:327)
 
        at 
org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(AbstractWebMvcEndpointHandlerMapping.java:434)
 
        at 
java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
 
        at java.base/java.lang.reflect.Method.invoke(Method.java:580) 
        at 
org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:258)
 
        at 
org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:191)
 
        at 
org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:118)
 
        at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:991)
 
        at 
org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:896)
 
        at 
org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
 
        at 
org.springframework.boot.actuate.autoconfigure.web.servlet.CompositeHandlerAdapter.handle(CompositeHandlerAdapter.java:58)
 
        at 
org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:1089)
 
        at 
org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:979)
 
        at 
org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:1014)
 
        at 
org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:903)
 
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:564) 
        at 
org.springframework.web.servlet.FrameworkServlet.service(FrameworkServlet.java:885)
 
        at jakarta.servlet.http.HttpServlet.service(HttpServlet.java:658) 
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:193)
 
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 
        at 
org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
 
        at 
org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:108)
 
        at 
org.springframework.security.web.FilterChainProxy.lambda$doFilterInternal$3(FilterChainProxy.java:231)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$FilterObservation$SimpleFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:490)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$1(ObservationFilterChainDecorator.java:351)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator.lambda$wrapSecured$0(ObservationFilterChainDecorator.java:83)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:129)
 
        at 
org.springframework.security.web.access.intercept.AuthorizationFilter.doFilter(AuthorizationFilter.java:101)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:125)
 
        at 
org.springframework.security.web.access.ExceptionTranslationFilter.doFilter(ExceptionTranslationFilter.java:119)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.AnonymousAuthenticationFilter.doFilter(AnonymousAuthenticationFilter.java:100)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.servletapi.SecurityContextHolderAwareRequestFilter.doFilter(SecurityContextHolderAwareRequestFilter.java:179)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.savedrequest.RequestCacheAwareFilter.doFilter(RequestCacheAwareFilter.java:63)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.www.BasicAuthenticationFilter.doFilterInternal(BasicAuthenticationFilter.java:181)
 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.ui.DefaultLogoutPageGeneratingFilter.doFilterInternal(DefaultLogoutPageGeneratingFilter.java:59)
 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:216)
 
        at 
org.springframework.security.web.authentication.ui.DefaultLoginPageGeneratingFilter.doFilter(DefaultLoginPageGeneratingFilter.java:202)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.ui.DefaultResourcesFilter.doFilter(DefaultResourcesFilter.java:72)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:235)
 
        at 
org.springframework.security.web.authentication.AbstractAuthenticationProcessingFilter.doFilter(AbstractAuthenticationProcessingFilter.java:229)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:107)
 
        at 
org.springframework.security.web.authentication.logout.LogoutFilter.doFilter(LogoutFilter.java:93)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.csrf.CsrfFilter.doFilterInternal(CsrfFilter.java:117)
 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.web.filter.CorsFilter.doFilterInternal(CorsFilter.java:91) 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.header.HeaderWriterFilter.doHeadersAfter(HeaderWriterFilter.java:90)
 
        at 
org.springframework.security.web.header.HeaderWriterFilter.doFilterInternal(HeaderWriterFilter.java:75)
 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:82)
 
        at 
org.springframework.security.web.context.SecurityContextHolderFilter.doFilter(SecurityContextHolderFilter.java:69)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.context.request.async.WebAsyncManagerIntegrationFilter.doFilterInternal(WebAsyncManagerIntegrationFilter.java:62)
 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:228)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.session.DisableEncodeUrlFilter.doFilterInternal(DisableEncodeUrlFilter.java:42)
 
        at 
org.springframework.web.filter.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:116)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.wrapFilter(ObservationFilterChainDecorator.java:241)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$AroundFilterObservation$SimpleAroundFilterObservation.lambda$wrap$0(ObservationFilterChainDecorator.java:334)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$ObservationFilter.doFilter(ObservationFilterChainDecorator.java:225)
 
        at 
org.springframework.security.web.ObservationFilterChainDecorator$VirtualFilterChain.doFilter(ObservationFilterChainDecorator.java:138)
 
        at 
org.springframework.security.web.FilterChainProxy.doFilterInternal(FilterChainProxy.java:233)
 
        at 
org.springframework.security.web.FilterChainProxy.doFilter(FilterChainProxy.java:191)
 
        at 
org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
 
        at 
org.springframework.web.filter.ServletRequestPathFilter.doFilter(ServletRequestPathFilter.java:52)
 
        at 
org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
 
        at 
org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
 
        at 
org.springframework.security.config.annotation.web.configuration.WebSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebSecurityConfiguration.java:319)
 
        at 
org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
 
        at 
org.springframework.web.servlet.handler.HandlerMappingIntrospector.lambda$createCacheFilter$4(HandlerMappingIntrospector.java:267)
 
        at 
org.springframework.web.filter.CompositeFilter$VirtualFilterChain.doFilter(CompositeFilter.java:113)
 
        at 
org.springframework.web.filter.CompositeFilter.doFilter(CompositeFilter.java:74)
 
        at 
org.springframework.security.config.annotation.web.configuration.WebMvcSecurityConfiguration$CompositeFilterChainProxy.doFilter(WebMvcSecurityConfiguration.java:240)
 
        at 
org.springframework.web.filter.DelegatingFilterProxy.invokeDelegate(DelegatingFilterProxy.java:362)
 
        at 
org.springframework.web.filter.DelegatingFilterProxy.doFilter(DelegatingFilterProxy.java:278)
 
        at 
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:162)
 
        at 
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:138)
 
        at 
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:165)
 
        at 
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:88)
 
        at 
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:482)
 
        at 
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:113) 
        at 
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:83) 
        at 
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:72)
 
        at 
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:342) 
        at 
org.apache.coyote.http11.Http11Processor.service(Http11Processor.java:399) 
        at 
org.apache.coyote.AbstractProcessorLight.process(AbstractProcessorLight.java:63)
 
        at 
org.apache.coyote.AbstractProtocol$ConnectionHandler.process(AbstractProtocol.java:903)
 
        at 
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1774)
 
        at 
org.apache.tomcat.util.net.SocketProcessorBase.run(SocketProcessorBase.java:52) 
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:973)
 
        at 
org.apache.tomcat.util.threads.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:491)
 
        at 
org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:63)
 
        at java.base/java.lang.Thread.run(Thread.java:1583) 
{code}


> camel health check breaks if one component has exception without message
> ------------------------------------------------------------------------
>
>                 Key: CAMEL-22936
>                 URL: https://issues.apache.org/jira/browse/CAMEL-22936
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 4.14.4
>            Reporter: Michael Kroll
>            Priority: Minor
>             Fix For: 4.14.5, 4.18.0
>
>
> Hi there,
> after activating the healthcheck endpoint in our camel spring boot 
> application with a dozen routes, i noticed the following error when calling 
> the endpoint:
> {code:java}
> 11:56:56.981 [http-nio-8081-exec-3] WARN  
> o.a.c.s.b.a.h.CamelHealthCheckIndicator Health check failed
> java.lang.IllegalArgumentException: 'value' must not be null
>      at org.springframework.util.Assert.notNull(Assert.java:181)
>      at 
> org.springframework.boot.actuate.health.Health$Builder.withDetail(Health.java:247)
>      at 
> org.apache.camel.spring.boot.actuate.health.CamelHealthHelper.lambda$applyHealthDetail$1(CamelHealthHelper.java:63)
> {code}
> Looking at the last line in this stacktrace, this is the source in 4.14.4:
> {code:java}
> builder.withDetail("error.message", error.getMessage());
> {code}
> Now, error is a Throwable. The javadoc/contract of Throwable#getMessage() 
> says:
> {quote}Returns: the detail message string of this Throwable instance 
> {*}(which may be null){*}.
> {quote}
> I highlighted the important part.
> Now let's have a look at the called 
> org.springframework.boot.actuate.health.Health$Builder.withDetail() method:
> {code:java}
>               public Builder withDetail(String key, Object value) {
>                       Assert.notNull(key, "'key' must not be null");
>                       Assert.notNull(value, "'value' must not be null");
>                       this.details.put(key, value);
>                       return this;
>               }
> {code}
> Both parameters are not allowed to be null. Which may crash when 
> Throwable#getMessage returns null and is used as value.
> Now for the bad news: the resulting RuntimeException not only breaks the 
> health report on a single component. But it is thrown into the caller 
> org.apache.camel.spring.boot.actuate.health.CamelHealthCheckIndicator#doHealthCheck,
>  where it {*}aborts the whole CamelHealthCheckIndicator, for all camel 
> components{*}.
> For me, this is pretty serious: one Consumer that throws an exception without 
> message is enough for the whole healthceck result to collapse.
> I think the two colliding contracts above are enough to declare this as a 
> bug, i hope you think so, too. Sadly i don't have time to build a reproducer.
> But just to give an example, my WebDavConsumer breaks with the following 
> stacktrace:
> {code:java}
> 11:56:55.062 [http-nio-8081-exec-1] WARN  
> o.a.c.s.b.a.h.r.CamelReadinessStateHealthIndicator null
> org.apache.http.client.ClientProtocolException 
> at 
> org.apache.http.impl.client.InternalHttpClient.doExecute(InternalHttpClient.java:187)
>  
> at 
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:72)
>  
> at 
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:221)
>  
> at 
> org.apache.http.impl.client.CloseableHttpClient.execute(CloseableHttpClient.java:165)
>  
> at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:1080) 
> at com.github.sardine.impl.SardineImpl.execute(SardineImpl.java:1049) 
> at com.github.sardine.impl.SardineImpl.propfind(SardineImpl.java:424) 
> at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:357) 
> at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:347) 
> at com.github.sardine.impl.SardineImpl.list(SardineImpl.java:341) 
> at 
> org.example.webdav.adapter.AdapterFactory$SardineWrapper.list(AdapterFactory.java:72)
>  
> at 
> org.example.webdav.component.WebDavConsumer.getWebDavFiles(WebDavConsumer.java:85)
>  
> at org.example.webdav.component.WebDavConsumer.poll(WebDavConsumer.java:37)
> {code}
> {*}Proposed fix{*}:
> {code:java}
> - builder.withDetail("error.message", error.getMessage());
> + builder.withDetail("error.message", error.getMessage() == null ? "" : 
> error.getMessage());
> {code}
>  
> As a side note, why does calling the health endpoint make all my 
> org.apache.camel.support.ScheduledPollConsumer implementations poll? They 
> have a startupDelay configured, which is broken by calling the health 
> endpoint. Sounds strange to me.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to