This is an automated email from the ASF dual-hosted git repository. ffang pushed a commit to branch main in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/main by this push: new 5f73f114c52 [CAMEL-18394]CXF-Consumer does not start in SpringBoot runtime new 5162d38f352 Merge branch 'main' of github.com:apache/camel 5f73f114c52 is described below commit 5f73f114c52c219826f8831977e951c0a0cbfcb7 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 --- .../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 {