This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch camel-3.18.x in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-3.18.x by this push: new 52ba02b0395 [CAMEL-18394]CXF-Consumer does not start in SpringBoot runtime 52ba02b0395 is described below commit 52ba02b03950b1dce7b39e6a5bd5b513b9e710ab Author: Freeman Fang <freeman.f...@gmail.com> AuthorDate: Mon Aug 15 13:03:38 2022 -0400 [CAMEL-18394]CXF-Consumer does not start in SpringBoot runtime (cherry picked from commit 5f73f114c52c219826f8831977e951c0a0cbfcb7) --- .../java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java index 5367424c0c3..231c5266e70 100644 --- a/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java +++ b/components/camel-cxf/camel-cxf-soap/src/main/java/org/apache/camel/component/cxf/jaxws/CxfEndpoint.java @@ -950,15 +950,21 @@ public class CxfEndpoint extends DefaultEndpoint implements AsyncEndpoint, Heade public Bus getBus() { if (bus == null) { CamelContext context = getCamelContext(); - if (context.getClass().getName().endsWith("SpringCamelContext")) { + if (context.getClass().getName().endsWith("SpringCamelContext") || + context.getClass().getName().endsWith("SpringBootCamelContext")) { try { Class<?> cxfSpringEndpintUtilClazz = Class.forName("org.apache.camel.component.cxf.spring.jaxws.CxfSpringEndpointUtils"); Method method = cxfSpringEndpintUtilClazz.getMethod("createBus", CamelContext.class); bus = (Bus) method.invoke(null, context); } catch (Exception ex) { - LOG.warn("Error creating Cxf Bus from SpringCamelContext: {} This exception will be ignored.", + if (context.getClass().getName().endsWith("SpringCamelContext")) { + LOG.warn("Error creating Cxf Bus from SpringCamelContext: {} This exception will be ignored.", ex.getMessage(), ex); + } else { + LOG.warn("Error creating Cxf Bus from SpringBootCamelContext: {} This exception will be ignored.", + ex.getMessage(), ex); + } bus = CxfEndpointUtils.createBus(getCamelContext()); } } else {