You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@camel.apache.org by mongoosej <mo...@foxmail.com> on 2023/04/08 08:22:33 UTC
RE: How can I add Routes use Spring DSL when use SpringBoot?
Run with Camel 3.20.0, SpringBoot 2.7.6, JDK 11 still report 'circular reference'.
This is my import camel xml:
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
">
<camelContext xmlns="http://camel.apache.org/schema/spring" id="mq-test">
<route>
<from uri="activemqq:topic:WCS.BroadcastQueue"></from>
<process ref="wcs3ActiveMQProcessor" />
</route>
</camelContext>
<bean id="activemqq" class="org.apache.camel.component.activemq.ActiveMQComponent">
<property name="connectionFactory">
<bean class="org.apache.activemq.ActiveMQConnectionFactory">
<property name="brokerURL" value="tcp://123.123.123.123:61616" />
</bean>
</property>
</bean>
</beans>
This is my main class:
@ImportResource(locations = {"classpath:camel.xml"})
@SpringBootApplication
public class InterfaceApplication {
public static void main(String[] args) {
SpringApplication app = new SpringApplication(InterfaceApplication.class);
app.setBannerMode(Mode.OFF);
app.setWebApplicationType(WebApplicationType.NONE);
app.run(args);
}
}
------------------ 原始邮件 ------------------
发件人: "users" <chirag.sanghavi@gmail.com>;
发送时间: 2023年4月8日(星期六) 凌晨3:54
收件人: "users"<users@camel.apache.org>;
主题: Re: How can I add Routes use Spring DSL when use SpringBoot?
Ran with 3.20.x
[INFO] Scanning for projects...
[INFO]
[INFO] --< org.apache.camel.springboot.example:camel-example-spring-boot-xml-import
>--
[INFO] Building Camel SB Examples :: XML Import 3.20.0
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.7.6:run (default-cli) >
test-compile @ camel-example-spring-boot-xml-import >>>
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-maven-version)
@ camel-example-spring-boot-xml-import ---
[INFO]
[INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-java-version)
@ camel-example-spring-boot-xml-import ---
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:resources (default-resources)
@ camel-example-spring-boot-xml-import ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] Copying 2 resources
[INFO]
[INFO] --- camel-package-maven-plugin:3.20.0:prepare-example (default)
@ camel-example-spring-boot-xml-import ---
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @
camel-example-spring-boot-xml-import ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.2.0:testResources
(default-testResources) @ camel-example-spring-boot-xml-import
---[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Using 'UTF-8' encoding to copy filtered properties files.
[INFO] skip non existing resourceDirectory
C:\projects\camel-spring-boot-examples\xml-import\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.10.1:testCompile
(default-testCompile) @ camel-example-spring-boot-xml-import ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.7.6:run (default-cli) <
test-compile @ camel-example-spring-boot-xml-import <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.7.6:run (default-cli) @
camel-example-spring-boot-xml-import ---
[INFO] Attaching agents: []
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.7.6)
2023-04-07 15:50:30.808 INFO 9532 --- [ main]
sample.camel.SampleCamelApplication : Starting
SampleCamelApplication using Java 19.0.1 on MA-008851614757 with PID
9532 (C:\projects\camel-spring-boot-examples\xml-import\target\classes
started by csanghavi in
C:\projects\camel-spring-boot-examples\xml-import)
2023-04-07 15:50:30.810 INFO 9532 --- [ main]
sample.camel.SampleCamelApplication : No active profile set,
falling back to 1 default profile: "default"
2023-04-07 15:50:32.612 WARN 9532 --- [ main]
io.undertow.websockets.jsr : UT026010: Buffer pool was
not set on WebSocketDeploymentInfo, the default pool will be used
2023-04-07 15:50:32.631 INFO 9532 --- [ main]
io.undertow.servlet : Initializing Spring
embedded WebApplicationContext
2023-04-07 15:50:32.632 INFO 9532 --- [ main]
w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
initialization completed in 1782 ms
2023-04-07 15:50:33.355 INFO 9532 --- [ main]
o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s)
beneath base path '/actuator'
2023-04-07 15:50:33.414 INFO 9532 --- [ main] io.undertow
: starting server: Undertow - 2.2.20.Final
2023-04-07 15:50:33.429 INFO 9532 --- [ main] org.xnio
: XNIO version 3.8.7.Final
2023-04-07 15:50:33.437 INFO 9532 --- [ main] org.xnio.nio
: XNIO NIO Implementation Version
3.8.7.Final
2023-04-07 15:50:33.572 INFO 9532 --- [ main]
org.jboss.threads : JBoss Threads version
3.1.0.Final
2023-04-07 15:50:33.622 INFO 9532 --- [ main]
o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s)
8080 (http)
2023-04-07 15:50:33.818 INFO 9532 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
(SampleCamel) is starting
2023-04-07 15:50:33.836 INFO 9532 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Routes startup (started:1)
2023-04-07 15:50:33.837 INFO 9532 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Started hello
(timer://hello)
2023-04-07 15:50:33.837 INFO 9532 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
(SampleCamel) started in 210ms (build:20ms init:173ms start:17ms)
2023-04-07 15:50:33.862 INFO 9532 --- [ main]
sample.camel.SampleCamelApplication : Started
SampleCamelApplication in 3.403 seconds (JVM running for 3.885)
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
Hello World
2023-04-07 15:50:52.058 INFO 9532 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
(SampleCamel) is shutting down (timeout:45s)
2023-04-07 15:50:52.070 INFO 9532 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Routes stopped (stopped:1)
2023-04-07 15:50:52.071 INFO 9532 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Stopped hello
(timer://hello)
2023-04-07 15:50:52.077 INFO 9532 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
(SampleCamel) shutdown in 18ms (uptime:18s)
2023-04-07 15:50:52.078 INFO 9532 --- [ionShutdownHook] io.undertow
: stopping server: Undertow - 2.2.20.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 25.270 s
[INFO] Finished at: 2023-04-07T15:50:52-04:00
[INFO] ------------------------------------------------------------------------
Terminate batch job (Y/N)?
Also ran with 3.14.7
C:\projects\camel-spring-boot-examples\xml-import>mvn spring-boot:run
[INFO] Scanning for projects...
[INFO]
[INFO] --< org.apache.camel.springboot.example:camel-example-spring-boot-xml-import
>--
[INFO] Building Camel SB Examples :: XML Import 3.14.7
[INFO] --------------------------------[ jar ]---------------------------------
[INFO]
[INFO] >>> spring-boot-maven-plugin:2.6.13:run (default-cli) >
test-compile @ camel-example-spring-boot-xml-import >>>
[INFO]
[INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version)
@ camel-example-spring-boot-xml-import ---
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:resources (default-resources)
@ camel-example-spring-boot-xml-import ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] Copying 2 resources
[INFO]
[INFO] --- camel-package-maven-plugin:3.20.0:prepare-example (default)
@ camel-example-spring-boot-xml-import ---
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @
camel-example-spring-boot-xml-import ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] --- maven-resources-plugin:3.1.0:testResources
(default-testResources) @ camel-example-spring-boot-xml-import ---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
C:\projects\camel-spring-boot-examples\xml-import\src\test\resources
[INFO]
[INFO] --- maven-compiler-plugin:3.8.1:testCompile
(default-testCompile) @ camel-example-spring-boot-xml-import ---
[INFO] Nothing to compile - all classes are up to date
[INFO]
[INFO] <<< spring-boot-maven-plugin:2.6.13:run (default-cli) <
test-compile @ camel-example-spring-boot-xml-import <<<
[INFO]
[INFO]
[INFO] --- spring-boot-maven-plugin:2.6.13:run (default-cli) @
camel-example-spring-boot-xml-import ---
[INFO] Attaching agents: []
. ____ _ __ _ _
/\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
\\/ ___)| |_)| | | | | || (_| | ) ) ) )
' |____| .__|_| |_|_| |_\__, | / / / /
=========|_|==============|___/=/_/_/_/
:: Spring Boot :: (v2.6.13)
2023-04-07 15:53:31.728 INFO 25496 --- [ main]
sample.camel.SampleCamelApplication : Starting
SampleCamelApplication using Java 19.0.1 on MA-008851614757 with PID
25496 (C:\projects\camel-spring-boot-examples\xml-import\target\classes
started by csanghavi in
C:\projects\camel-spring-boot-examples\xml-import)
2023-04-07 15:53:31.730 INFO 25496 --- [ main]
sample.camel.SampleCamelApplication : No active profile set,
falling back to 1 default profile: "default"
2023-04-07 15:53:33.188 WARN 25496 --- [ main]
io.undertow.websockets.jsr : UT026010: Buffer pool was
not set on WebSocketDeploymentInfo, the default pool will be used
2023-04-07 15:53:33.203 INFO 25496 --- [ main]
io.undertow.servlet : Initializing Spring
embedded WebApplicationContext
2023-04-07 15:53:33.204 INFO 25496 --- [ main]
w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
initialization completed in 1432 ms
2023-04-07 15:53:33.815 INFO 25496 --- [ main]
o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s)
beneath base path '/actuator'
2023-04-07 15:53:33.864 INFO 25496 --- [ main] io.undertow
: starting server: Undertow - 2.2.20.Final
2023-04-07 15:53:33.870 INFO 25496 --- [ main] org.xnio
: XNIO version 3.8.7.Final
2023-04-07 15:53:33.877 INFO 25496 --- [ main] org.xnio.nio
: XNIO NIO Implementation Version
3.8.7.Final
2023-04-07 15:53:33.982 INFO 25496 --- [ main]
org.jboss.threads : JBoss Threads version
3.1.0.Final
2023-04-07 15:53:34.027 INFO 25496 --- [ main]
o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s)
8080 (http)
2023-04-07 15:53:34.191 INFO 25496 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Routes startup (total:1
started:1)
2023-04-07 15:53:34.192 INFO 25496 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Started hello
(timer://hello)
2023-04-07 15:53:34.195 INFO 25496 --- [ main]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.14.7
(SampleCamel) started in 162ms (build:16ms init:133ms start:13ms)
2023-04-07 15:53:34.214 INFO 25496 --- [ main]
sample.camel.SampleCamelApplication : Started
SampleCamelApplication in 2.791 seconds (JVM running for 3.121)
Hello World
Hello World
2023-04-07 15:53:37.824 INFO 25496 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.14.7
(SampleCamel) shutting down (timeout:45s)
2023-04-07 15:53:37.838 INFO 25496 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Routes stopped (total:1
stopped:1)
2023-04-07 15:53:37.839 INFO 25496 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Stopped hello
(timer://hello)
2023-04-07 15:53:37.844 INFO 25496 --- [ionShutdownHook]
o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.14.7
(SampleCamel) shutdown in 20ms (uptime:3s662ms)
2023-04-07 15:53:37.848 INFO 25496 --- [ionShutdownHook] io.undertow
: stopping server: Undertow - 2.2.20.Final
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 9.072 s
[INFO] Finished at: 2023-04-07T15:53:37-04:00
[INFO] ------------------------------------------------------------------------
Terminate batch job (Y/N)?
ચિરાગ/चिराग/Chirag
------------------------------------------
Sent from My Gmail Account
On Fri, Apr 7, 2023 at 3:38 AM mongoosej <mongoosej@foxmail.com> wrote:
>
> Dear Claudio Miranda:
>
>
> &nbsp; I see the examples using spring boot at&nbsp;https://github.com/apache/camel-spring-boot-examples/tree/main/xml-import, and I run this example under JDK1.8 and Camel 3.14.7,
> but the SpringBoot still report 'circular reference':
>
>
> org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'SampleCamel': Requested bean is currently in creation: Is there an unresolvable circular reference?
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:355) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:227) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.15.jar:5.3.15]
> at org.apache.camel.spring.xml.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:79) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:113) ~[camel-base-engine-3.14.7.jar:3.14.7]
> at org.apache.camel.spring.xml.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:172) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:66) ~[camel-spring-3.14.7.jar:3.14.7]
> at org.apache.camel.support.ResolverHelper.resolveService(ResolverHelper.java:195) ~[camel-support-3.14.7.jar:3.14.7]
> at org.apache.camel.impl.engine.SimpleCamelContext.createHealthCheckRegistry(SimpleCamelContext.java:126) ~[camel-base-engine-3.14.7.jar:3.14.7]
> at org.apache.camel.impl.engine.AbstractCamelContext.doBuild(AbstractCamelContext.java:2679) ~[camel-base-engine-3.14.7.jar:3.14.7]
> at org.apache.camel.spring.SpringCamelContext.doBuild(SpringCamelContext.java:106) ~[camel-spring-3.14.7.jar:3.14.7]
> at org.apache.camel.support.service.BaseService.build(BaseService.java:63) ~[camel-api-3.14.7.jar:3.14.7]
> at org.apache.camel.spring.xml.CamelContextFactoryBean.getContext(CamelContextFactoryBean.java:548) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.apache.camel.spring.xml.CamelContextFactoryBean.getContext(CamelContextFactoryBean.java:99) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.getContext(AbstractCamelContextFactoryBean.java:924) ~[camel-core-xml-3.14.7.jar:3.14.7]
> at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.afterPropertiesSet(AbstractCamelContextFactoryBean.java:191) ~[camel-core-xml-3.14.7.jar:3.14.7]
> at org.apache.camel.spring.xml.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:365) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.15.jar:5.3.15]
> at org.apache.camel.spring.xml.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:79) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:113) ~[camel-base-engine-3.14.7.jar:3.14.7]
> at org.apache.camel.spring.xml.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:172) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:934) ~[spring-beans-5.3.15.jar:5.3.15]
> at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.15.jar:5.3.15]
> at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.15.jar:5.3.15]
> at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.3.jar:2.6.3]
> at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) [spring-boot-2.6.3.jar:2.6.3]
> at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:414) [spring-boot-2.6.3.jar:2.6.3]
> at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) [spring-boot-2.6.3.jar:2.6.3]
> at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.6.3.jar:2.6.3]
> at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.6.3.jar:2.6.3]
> at sample.camel.SampleCamelApplication.main(SampleCamelApplication.java:36) [classes/:na]
>
>
> 2023-04-07 15:30:58.278 ERROR 4840 --- [&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;main] o.s.b.d.LoggingFailureAnalysisReporter&nbsp; &nbsp;:&nbsp;
>
>
> ***************************
> APPLICATION FAILED TO START
> ***************************
>
>
> Description:
>
>
> The dependencies of some of the beans in the application context form a cycle:
>
>
> &nbsp; &nbsp;template
> ┌─────┐
> |&nbsp; SampleCamel
> ↑&nbsp; &nbsp; &nbsp;↓
> |&nbsp; org.apache.camel.impl.health.DefaultHealthCheckRegistry
> └─────┘
>
>
>
>
> Action:
>
>
> Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
>
>
> &nbsp; Is the version of Camel 3.14.7 exist bug with SpringBoot?
> &nbsp; How can I solve this problem?
>
>
> &nbsp; Look forward your relpy, thanks.
>
>
>
>
>
>
>
> &gt;On Thu, Apr 6, 2023 at 12:30 PM mongoosej <mongoosej@foxmail.com&gt; wrote:
> &gt;&gt;
> &gt;&gt; How can I add Routes use Spring DSL when I use SpringBoot?
> &gt;&gt; In my project, I use SpringBoot not Spring, and I write route use XML not Java DSL, then I get error when I startup my SpringBoot application:
>
> &gt;There are several examples using spring boot, please have a look there
> &gt;https://github.com/apache/camel-spring-boot-examples
>
>
> &gt;--
> &gt;&nbsp; Claudio Miranda
>
> &gt;claudio@claudius.com.br
> &gt;http://www.claudius.com.br
RE: How can I add Routes use Spring DSL when use SpringBoot?
Posted by mongoosej <mo...@foxmail.com>.
All right, this is the github address: https://github.com/mongoosejar/camel-xml-test
Look forward your reply
MongooseJ
------------------ 原始邮件 ------------------
发件人: "users" <chirag.sanghavi@gmail.com>;
发送时间: 2023年4月9日(星期天) 凌晨0:43
收件人: "users"<users@camel.apache.org>;
主题: Re: How can I add Routes use Spring DSL when use SpringBoot?
can you create a project and share via github to reproduce?
ચિરાગ/चिराग/Chirag
------------------------------------------
Sent from My Gmail Account
On Sat, Apr 8, 2023 at 4:23 AM mongoosej <mongoosej@foxmail.com> wrote:
>
> Run with Camel 3.20.0, SpringBoot 2.7.6, JDK 11 still report 'circular reference'.
>
>
> This is my import camel xml:
> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> &nbsp; &nbsp; http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
> &nbsp; &nbsp; http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
> &nbsp; &nbsp; "&gt;
> <camelContext xmlns="http://camel.apache.org/schema/spring" id="mq-test"&gt;
> <route&gt;
> <from uri="activemqq:topic:WCS.BroadcastQueue"&gt;</from&gt;
> <process ref="wcs3ActiveMQProcessor" /&gt;
> </route&gt;
> </camelContext&gt;
> <bean id="activemqq" class="org.apache.camel.component.activemq.ActiveMQComponent"&gt;
> <property name="connectionFactory"&gt;
> <bean class="org.apache.activemq.ActiveMQConnectionFactory"&gt;
> <property name="brokerURL" value="tcp://123.123.123.123:61616" /&gt;
> </bean&gt;
> </property&gt;
> </bean&gt;
> </beans&gt;
>
>
>
> This is my main class:
> @ImportResource(locations = {"classpath:camel.xml"})
> @SpringBootApplication
> public class InterfaceApplication {
>
> public static void main(String[] args) {
> SpringApplication app = new SpringApplication(InterfaceApplication.class);
> app.setBannerMode(Mode.OFF);
> app.setWebApplicationType(WebApplicationType.NONE);
> app.run(args);
> }
>
> }
>
>
>
> ------------------&nbsp;原始邮件&nbsp;------------------
> 发件人: "users" <chirag.sanghavi@gmail.com&gt;;
> 发送时间:&nbsp;2023年4月8日(星期六) 凌晨3:54
> 收件人:&nbsp;"users"<users@camel.apache.org&gt;;
>
> 主题:&nbsp;Re: How can I add Routes use Spring DSL when use SpringBoot?
>
>
>
> Ran with 3.20.x
>
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.camel.springboot.example:camel-example-spring-boot-xml-import
> &gt;--
> [INFO] Building Camel SB Examples :: XML Import 3.20.0
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] &gt;&gt;&gt; spring-boot-maven-plugin:2.7.6:run (default-cli) &gt;
> test-compile @ camel-example-spring-boot-xml-import &gt;&gt;&gt;
> [INFO]
> [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-maven-version)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-java-version)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources)
> @ camel-example-spring-boot-xml-import ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Using 'UTF-8' encoding to copy filtered properties files.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- camel-package-maven-plugin:3.20.0:prepare-example (default)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @
> camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:3.2.0:testResources
> (default-testResources) @ camel-example-spring-boot-xml-import
> ---[INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Using 'UTF-8' encoding to copy filtered properties files.
> [INFO] skip non existing resourceDirectory
> C:\projects\camel-spring-boot-examples\xml-import\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.10.1:testCompile
> (default-testCompile) @ camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] <<< spring-boot-maven-plugin:2.7.6:run (default-cli) <
> test-compile @ camel-example-spring-boot-xml-import <<<
> [INFO]
> [INFO]
> [INFO] --- spring-boot-maven-plugin:2.7.6:run (default-cli) @
> camel-example-spring-boot-xml-import ---
> [INFO] Attaching agents: []
>
> &nbsp; .&nbsp;&nbsp; ____&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __ _ _
> &nbsp;/\\ / ___'_ __ _ _(_)_ __&nbsp; __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> &nbsp;\\/&nbsp; ___)| |_)| | | | | || (_| |&nbsp; ) ) ) )
> &nbsp; '&nbsp; |____| .__|_| |_|_| |_\__, | / / / /
> &nbsp;=========|_|==============|___/=/_/_/_/
> &nbsp;:: Spring Boot ::&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (v2.7.6)
>
> 2023-04-07 15:50:30.808&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> sample.camel.SampleCamelApplication&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Starting
> SampleCamelApplication using Java 19.0.1 on MA-008851614757 with PID
> 9532 (C:\projects\camel-spring-boot-examples\xml-import\target\classes
> started by csanghavi in
> C:\projects\camel-spring-boot-examples\xml-import)
> 2023-04-07 15:50:30.810&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> sample.camel.SampleCamelApplication&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : No active profile set,
> falling back to 1 default profile: "default"
> 2023-04-07 15:50:32.612&nbsp; WARN 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> io.undertow.websockets.jsr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : UT026010: Buffer pool was
> not set on WebSocketDeploymentInfo, the default pool will be used
> 2023-04-07 15:50:32.631&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> io.undertow.servlet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Initializing Spring
> embedded WebApplicationContext
> 2023-04-07 15:50:32.632&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
> initialization completed in 1782 ms
> 2023-04-07 15:50:33.355&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.s.b.a.e.web.EndpointLinksResolver&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Exposing 1 endpoint(s)
> beneath base path '/actuator'
> 2023-04-07 15:50:33.414&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main] io.undertow
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : starting server: Undertow - 2.2.20.Final
> 2023-04-07 15:50:33.429&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main] org.xnio
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : XNIO version 3.8.7.Final
> 2023-04-07 15:50:33.437&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main] org.xnio.nio
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : XNIO NIO Implementation Version
> 3.8.7.Final
> 2023-04-07 15:50:33.572&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> org.jboss.threads&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : JBoss Threads version
> 3.1.0.Final
> 2023-04-07 15:50:33.622&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.s.b.w.e.undertow.UndertowWebServer&nbsp;&nbsp;&nbsp;&nbsp; : Undertow started on port(s)
> 8080 (http)
> 2023-04-07 15:50:33.818&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.20.0
> (SampleCamel) is starting
> 2023-04-07 15:50:33.836&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Routes startup (started:1)
> 2023-04-07 15:50:33.837&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; Started hello
> (timer://hello)
> 2023-04-07 15:50:33.837&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.20.0
> (SampleCamel) started in 210ms (build:20ms init:173ms start:17ms)
> 2023-04-07 15:50:33.862&nbsp; INFO 9532 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> sample.camel.SampleCamelApplication&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Started
> SampleCamelApplication in 3.403 seconds (JVM running for 3.885)
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> 2023-04-07 15:50:52.058&nbsp; INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.20.0
> (SampleCamel) is shutting down (timeout:45s)
> 2023-04-07 15:50:52.070&nbsp; INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Routes stopped (stopped:1)
> 2023-04-07 15:50:52.071&nbsp; INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; Stopped hello
> (timer://hello)
> 2023-04-07 15:50:52.077&nbsp; INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.20.0
> (SampleCamel) shutdown in 18ms (uptime:18s)
> 2023-04-07 15:50:52.078&nbsp; INFO 9532 --- [ionShutdownHook] io.undertow
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : stopping server: Undertow - 2.2.20.Final
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:&nbsp; 25.270 s
> [INFO] Finished at: 2023-04-07T15:50:52-04:00
> [INFO] ------------------------------------------------------------------------
> Terminate batch job (Y/N)?
>
>
> Also ran with 3.14.7
> C:\projects\camel-spring-boot-examples\xml-import&gt;mvn spring-boot:run
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.camel.springboot.example:camel-example-spring-boot-xml-import
> &gt;--
> [INFO] Building Camel SB Examples :: XML Import 3.14.7
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] &gt;&gt;&gt; spring-boot-maven-plugin:2.6.13:run (default-cli) &gt;
> test-compile @ camel-example-spring-boot-xml-import &gt;&gt;&gt;
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources)
> @ camel-example-spring-boot-xml-import ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- camel-package-maven-plugin:3.20.0:prepare-example (default)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @
> camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:3.1.0:testResources
> (default-testResources) @ camel-example-spring-boot-xml-import ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> C:\projects\camel-spring-boot-examples\xml-import\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.8.1:testCompile
> (default-testCompile) @ camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] <<< spring-boot-maven-plugin:2.6.13:run (default-cli) <
> test-compile @ camel-example-spring-boot-xml-import <<<
> [INFO]
> [INFO]
> [INFO] --- spring-boot-maven-plugin:2.6.13:run (default-cli) @
> camel-example-spring-boot-xml-import ---
> [INFO] Attaching agents: []
>
> &nbsp; .&nbsp;&nbsp; ____&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; _&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; __ _ _
> &nbsp;/\\ / ___'_ __ _ _(_)_ __&nbsp; __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> &nbsp;\\/&nbsp; ___)| |_)| | | | | || (_| |&nbsp; ) ) ) )
> &nbsp; '&nbsp; |____| .__|_| |_|_| |_\__, | / / / /
> &nbsp;=========|_|==============|___/=/_/_/_/
> &nbsp;:: Spring Boot ::&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (v2.6.13)
>
> 2023-04-07 15:53:31.728&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> sample.camel.SampleCamelApplication&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Starting
> SampleCamelApplication using Java 19.0.1 on MA-008851614757 with PID
> 25496 (C:\projects\camel-spring-boot-examples\xml-import\target\classes
> started by csanghavi in
> C:\projects\camel-spring-boot-examples\xml-import)
> 2023-04-07 15:53:31.730&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> sample.camel.SampleCamelApplication&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : No active profile set,
> falling back to 1 default profile: "default"
> 2023-04-07 15:53:33.188&nbsp; WARN 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> io.undertow.websockets.jsr&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : UT026010: Buffer pool was
> not set on WebSocketDeploymentInfo, the default pool will be used
> 2023-04-07 15:53:33.203&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> io.undertow.servlet&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Initializing Spring
> embedded WebApplicationContext
> 2023-04-07 15:53:33.204&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
> initialization completed in 1432 ms
> 2023-04-07 15:53:33.815&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.s.b.a.e.web.EndpointLinksResolver&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Exposing 1 endpoint(s)
> beneath base path '/actuator'
> 2023-04-07 15:53:33.864&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main] io.undertow
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : starting server: Undertow - 2.2.20.Final
> 2023-04-07 15:53:33.870&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main] org.xnio
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : XNIO version 3.8.7.Final
> 2023-04-07 15:53:33.877&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main] org.xnio.nio
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : XNIO NIO Implementation Version
> 3.8.7.Final
> 2023-04-07 15:53:33.982&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> org.jboss.threads&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : JBoss Threads version
> 3.1.0.Final
> 2023-04-07 15:53:34.027&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.s.b.w.e.undertow.UndertowWebServer&nbsp;&nbsp;&nbsp;&nbsp; : Undertow started on port(s)
> 8080 (http)
> 2023-04-07 15:53:34.191&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Routes startup (total:1
> started:1)
> 2023-04-07 15:53:34.192&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; Started hello
> (timer://hello)
> 2023-04-07 15:53:34.195&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.14.7
> (SampleCamel) started in 162ms (build:16ms init:133ms start:13ms)
> 2023-04-07 15:53:34.214&nbsp; INFO 25496 --- [&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; main]
> sample.camel.SampleCamelApplication&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : Started
> SampleCamelApplication in 2.791 seconds (JVM running for 3.121)
> Hello World
> Hello World
> 2023-04-07 15:53:37.824&nbsp; INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.14.7
> (SampleCamel) shutting down (timeout:45s)
> 2023-04-07 15:53:37.838&nbsp; INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Routes stopped (total:1
> stopped:1)
> 2023-04-07 15:53:37.839&nbsp; INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; :&nbsp;&nbsp;&nbsp;&nbsp; Stopped hello
> (timer://hello)
> 2023-04-07 15:53:37.844&nbsp; INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext&nbsp;&nbsp; : Apache Camel 3.14.7
> (SampleCamel) shutdown in 20ms (uptime:3s662ms)
> 2023-04-07 15:53:37.848&nbsp; INFO 25496 --- [ionShutdownHook] io.undertow
> &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; : stopping server: Undertow - 2.2.20.Final
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:&nbsp; 9.072 s
> [INFO] Finished at: 2023-04-07T15:53:37-04:00
> [INFO] ------------------------------------------------------------------------
> Terminate batch job (Y/N)?
>
>
>
> ચિરાગ/चिराग/Chirag
> ------------------------------------------
> Sent from My Gmail Account
>
> On Fri, Apr 7, 2023 at 3:38 AM mongoosej <mongoosej@foxmail.com&gt; wrote:
> &gt;
> &gt; Dear Claudio Miranda:
> &gt;
> &gt;
> &gt; &amp;nbsp; I see the examples using spring boot at&amp;nbsp;https://github.com/apache/camel-spring-boot-examples/tree/main/xml-import, and I run this example under JDK1.8 and Camel 3.14.7,
> &gt; but the SpringBoot still report 'circular reference':
> &gt;
> &gt;
> &gt; org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'SampleCamel': Requested bean is currently in creation: Is there an unresolvable circular reference?
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:355) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:227) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:79) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:113) ~[camel-base-engine-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:172) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:66) ~[camel-spring-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.support.ResolverHelper.resolveService(ResolverHelper.java:195) ~[camel-support-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.impl.engine.SimpleCamelContext.createHealthCheckRegistry(SimpleCamelContext.java:126) ~[camel-base-engine-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.impl.engine.AbstractCamelContext.doBuild(AbstractCamelContext.java:2679) ~[camel-base-engine-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.SpringCamelContext.doBuild(SpringCamelContext.java:106) ~[camel-spring-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.support.service.BaseService.build(BaseService.java:63) ~[camel-api-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelContextFactoryBean.getContext(CamelContextFactoryBean.java:548) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelContextFactoryBean.getContext(CamelContextFactoryBean.java:99) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.getContext(AbstractCamelContextFactoryBean.java:924) ~[camel-core-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.afterPropertiesSet(AbstractCamelContextFactoryBean.java:191) ~[camel-core-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:365) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:79) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:113) ~[camel-base-engine-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.apache.camel.spring.xml.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:172) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:934) ~[spring-beans-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.15.jar:5.3.15]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.3.jar:2.6.3]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) [spring-boot-2.6.3.jar:2.6.3]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:414) [spring-boot-2.6.3.jar:2.6.3]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) [spring-boot-2.6.3.jar:2.6.3]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.6.3.jar:2.6.3]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.6.3.jar:2.6.3]
> &gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; at sample.camel.SampleCamelApplication.main(SampleCamelApplication.java:36) [classes/:na]
> &gt;
> &gt;
> &gt; 2023-04-07 15:30:58.278 ERROR 4840 --- [&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;main] o.s.b.d.LoggingFailureAnalysisReporter&amp;nbsp; &amp;nbsp;:&amp;nbsp;
> &gt;
> &gt;
> &gt; ***************************
> &gt; APPLICATION FAILED TO START
> &gt; ***************************
> &gt;
> &gt;
> &gt; Description:
> &gt;
> &gt;
> &gt; The dependencies of some of the beans in the application context form a cycle:
> &gt;
> &gt;
> &gt; &amp;nbsp; &amp;nbsp;template
> &gt; ┌─────┐
> &gt; |&amp;nbsp; SampleCamel
> &gt; ↑&amp;nbsp; &amp;nbsp; &amp;nbsp;↓
> &gt; |&amp;nbsp; org.apache.camel.impl.health.DefaultHealthCheckRegistry
> &gt; └─────┘
> &gt;
> &gt;
> &gt;
> &gt;
> &gt; Action:
> &gt;
> &gt;
> &gt; Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
> &gt;
> &gt;
> &gt; &amp;nbsp; Is the version of Camel 3.14.7 exist bug with SpringBoot?
> &gt; &amp;nbsp; How can I solve this problem?
> &gt;
> &gt;
> &gt; &amp;nbsp; Look forward your relpy, thanks.
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;
> &gt;
> &gt; &amp;gt;On Thu, Apr 6, 2023 at 12:30 PM mongoosej <mongoosej@foxmail.com&amp;gt; wrote:
> &gt; &amp;gt;&amp;gt;
> &gt; &amp;gt;&amp;gt; How can I add Routes use Spring DSL when I use SpringBoot?
> &gt; &amp;gt;&amp;gt; In my project, I use SpringBoot not Spring, and I write route use XML not Java DSL, then I get error when I startup my SpringBoot application:
> &gt;
> &gt; &amp;gt;There are several examples using spring boot, please have a look there
> &gt; &amp;gt;https://github.com/apache/camel-spring-boot-examples
> &gt;
> &gt;
> &gt; &amp;gt;--
> &gt; &amp;gt;&amp;nbsp; Claudio Miranda
> &gt;
> &gt; &amp;gt;claudio@claudius.com.br
> &gt; &amp;gt;http://www.claudius.com.br
Re: How can I add Routes use Spring DSL when use SpringBoot?
Posted by Chirag <ch...@gmail.com>.
can you create a project and share via github to reproduce?
ચિરાગ/चिराग/Chirag
------------------------------------------
Sent from My Gmail Account
On Sat, Apr 8, 2023 at 4:23 AM mongoosej <mo...@foxmail.com> wrote:
>
> Run with Camel 3.20.0, SpringBoot 2.7.6, JDK 11 still report 'circular reference'.
>
>
> This is my import camel xml:
> <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="
> http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
> http://camel.apache.org/schema/spring http://camel.apache.org/schema/spring/camel-spring.xsd
> ">
> <camelContext xmlns="http://camel.apache.org/schema/spring" id="mq-test">
> <route>
> <from uri="activemqq:topic:WCS.BroadcastQueue"></from>
> <process ref="wcs3ActiveMQProcessor" />
> </route>
> </camelContext>
> <bean id="activemqq" class="org.apache.camel.component.activemq.ActiveMQComponent">
> <property name="connectionFactory">
> <bean class="org.apache.activemq.ActiveMQConnectionFactory">
> <property name="brokerURL" value="tcp://123.123.123.123:61616" />
> </bean>
> </property>
> </bean>
> </beans>
>
>
>
> This is my main class:
> @ImportResource(locations = {"classpath:camel.xml"})
> @SpringBootApplication
> public class InterfaceApplication {
>
> public static void main(String[] args) {
> SpringApplication app = new SpringApplication(InterfaceApplication.class);
> app.setBannerMode(Mode.OFF);
> app.setWebApplicationType(WebApplicationType.NONE);
> app.run(args);
> }
>
> }
>
>
>
> ------------------ 原始邮件 ------------------
> 发件人: "users" <chirag.sanghavi@gmail.com>;
> 发送时间: 2023年4月8日(星期六) 凌晨3:54
> 收件人: "users"<users@camel.apache.org>;
>
> 主题: Re: How can I add Routes use Spring DSL when use SpringBoot?
>
>
>
> Ran with 3.20.x
>
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.camel.springboot.example:camel-example-spring-boot-xml-import
> >--
> [INFO] Building Camel SB Examples :: XML Import 3.20.0
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] >>> spring-boot-maven-plugin:2.7.6:run (default-cli) >
> test-compile @ camel-example-spring-boot-xml-import >>>
> [INFO]
> [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-maven-version)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-enforcer-plugin:3.0.0:enforce (enforce-java-version)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-resources-plugin:3.2.0:resources (default-resources)
> @ camel-example-spring-boot-xml-import ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Using 'UTF-8' encoding to copy filtered properties files.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- camel-package-maven-plugin:3.20.0:prepare-example (default)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-compiler-plugin:3.10.1:compile (default-compile) @
> camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:3.2.0:testResources
> (default-testResources) @ camel-example-spring-boot-xml-import
> ---[INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Using 'UTF-8' encoding to copy filtered properties files.
> [INFO] skip non existing resourceDirectory
> C:\projects\camel-spring-boot-examples\xml-import\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.10.1:testCompile
> (default-testCompile) @ camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] <<< spring-boot-maven-plugin:2.7.6:run (default-cli) <
> test-compile @ camel-example-spring-boot-xml-import <<<
> [INFO]
> [INFO]
> [INFO] --- spring-boot-maven-plugin:2.7.6:run (default-cli) @
> camel-example-spring-boot-xml-import ---
> [INFO] Attaching agents: []
>
> . ____ _ __ _ _
> /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> \\/ ___)| |_)| | | | | || (_| | ) ) ) )
> ' |____| .__|_| |_|_| |_\__, | / / / /
> =========|_|==============|___/=/_/_/_/
> :: Spring Boot :: (v2.7.6)
>
> 2023-04-07 15:50:30.808 INFO 9532 --- [ main]
> sample.camel.SampleCamelApplication : Starting
> SampleCamelApplication using Java 19.0.1 on MA-008851614757 with PID
> 9532 (C:\projects\camel-spring-boot-examples\xml-import\target\classes
> started by csanghavi in
> C:\projects\camel-spring-boot-examples\xml-import)
> 2023-04-07 15:50:30.810 INFO 9532 --- [ main]
> sample.camel.SampleCamelApplication : No active profile set,
> falling back to 1 default profile: "default"
> 2023-04-07 15:50:32.612 WARN 9532 --- [ main]
> io.undertow.websockets.jsr : UT026010: Buffer pool was
> not set on WebSocketDeploymentInfo, the default pool will be used
> 2023-04-07 15:50:32.631 INFO 9532 --- [ main]
> io.undertow.servlet : Initializing Spring
> embedded WebApplicationContext
> 2023-04-07 15:50:32.632 INFO 9532 --- [ main]
> w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
> initialization completed in 1782 ms
> 2023-04-07 15:50:33.355 INFO 9532 --- [ main]
> o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s)
> beneath base path '/actuator'
> 2023-04-07 15:50:33.414 INFO 9532 --- [ main] io.undertow
> : starting server: Undertow - 2.2.20.Final
> 2023-04-07 15:50:33.429 INFO 9532 --- [ main] org.xnio
> : XNIO version 3.8.7.Final
> 2023-04-07 15:50:33.437 INFO 9532 --- [ main] org.xnio.nio
> : XNIO NIO Implementation Version
> 3.8.7.Final
> 2023-04-07 15:50:33.572 INFO 9532 --- [ main]
> org.jboss.threads : JBoss Threads version
> 3.1.0.Final
> 2023-04-07 15:50:33.622 INFO 9532 --- [ main]
> o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s)
> 8080 (http)
> 2023-04-07 15:50:33.818 INFO 9532 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
> (SampleCamel) is starting
> 2023-04-07 15:50:33.836 INFO 9532 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Routes startup (started:1)
> 2023-04-07 15:50:33.837 INFO 9532 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Started hello
> (timer://hello)
> 2023-04-07 15:50:33.837 INFO 9532 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
> (SampleCamel) started in 210ms (build:20ms init:173ms start:17ms)
> 2023-04-07 15:50:33.862 INFO 9532 --- [ main]
> sample.camel.SampleCamelApplication : Started
> SampleCamelApplication in 3.403 seconds (JVM running for 3.885)
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> Hello World
> 2023-04-07 15:50:52.058 INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
> (SampleCamel) is shutting down (timeout:45s)
> 2023-04-07 15:50:52.070 INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Routes stopped (stopped:1)
> 2023-04-07 15:50:52.071 INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Stopped hello
> (timer://hello)
> 2023-04-07 15:50:52.077 INFO 9532 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.20.0
> (SampleCamel) shutdown in 18ms (uptime:18s)
> 2023-04-07 15:50:52.078 INFO 9532 --- [ionShutdownHook] io.undertow
> : stopping server: Undertow - 2.2.20.Final
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 25.270 s
> [INFO] Finished at: 2023-04-07T15:50:52-04:00
> [INFO] ------------------------------------------------------------------------
> Terminate batch job (Y/N)?
>
>
> Also ran with 3.14.7
> C:\projects\camel-spring-boot-examples\xml-import>mvn spring-boot:run
> [INFO] Scanning for projects...
> [INFO]
> [INFO] --< org.apache.camel.springboot.example:camel-example-spring-boot-xml-import
> >--
> [INFO] Building Camel SB Examples :: XML Import 3.14.7
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] >>> spring-boot-maven-plugin:2.6.13:run (default-cli) >
> test-compile @ camel-example-spring-boot-xml-import >>>
> [INFO]
> [INFO] --- maven-enforcer-plugin:1.4.1:enforce (enforce-maven-version)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-resources-plugin:3.1.0:resources (default-resources)
> @ camel-example-spring-boot-xml-import ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] Copying 2 resources
> [INFO]
> [INFO] --- camel-package-maven-plugin:3.20.0:prepare-example (default)
> @ camel-example-spring-boot-xml-import ---
> [INFO]
> [INFO] --- maven-compiler-plugin:3.8.1:compile (default-compile) @
> camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] --- maven-resources-plugin:3.1.0:testResources
> (default-testResources) @ camel-example-spring-boot-xml-import ---
> [INFO] Using 'UTF-8' encoding to copy filtered resources.
> [INFO] skip non existing resourceDirectory
> C:\projects\camel-spring-boot-examples\xml-import\src\test\resources
> [INFO]
> [INFO] --- maven-compiler-plugin:3.8.1:testCompile
> (default-testCompile) @ camel-example-spring-boot-xml-import ---
> [INFO] Nothing to compile - all classes are up to date
> [INFO]
> [INFO] <<< spring-boot-maven-plugin:2.6.13:run (default-cli) <
> test-compile @ camel-example-spring-boot-xml-import <<<
> [INFO]
> [INFO]
> [INFO] --- spring-boot-maven-plugin:2.6.13:run (default-cli) @
> camel-example-spring-boot-xml-import ---
> [INFO] Attaching agents: []
>
> . ____ _ __ _ _
> /\\ / ___'_ __ _ _(_)_ __ __ _ \ \ \ \
> ( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \
> \\/ ___)| |_)| | | | | || (_| | ) ) ) )
> ' |____| .__|_| |_|_| |_\__, | / / / /
> =========|_|==============|___/=/_/_/_/
> :: Spring Boot :: (v2.6.13)
>
> 2023-04-07 15:53:31.728 INFO 25496 --- [ main]
> sample.camel.SampleCamelApplication : Starting
> SampleCamelApplication using Java 19.0.1 on MA-008851614757 with PID
> 25496 (C:\projects\camel-spring-boot-examples\xml-import\target\classes
> started by csanghavi in
> C:\projects\camel-spring-boot-examples\xml-import)
> 2023-04-07 15:53:31.730 INFO 25496 --- [ main]
> sample.camel.SampleCamelApplication : No active profile set,
> falling back to 1 default profile: "default"
> 2023-04-07 15:53:33.188 WARN 25496 --- [ main]
> io.undertow.websockets.jsr : UT026010: Buffer pool was
> not set on WebSocketDeploymentInfo, the default pool will be used
> 2023-04-07 15:53:33.203 INFO 25496 --- [ main]
> io.undertow.servlet : Initializing Spring
> embedded WebApplicationContext
> 2023-04-07 15:53:33.204 INFO 25496 --- [ main]
> w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext:
> initialization completed in 1432 ms
> 2023-04-07 15:53:33.815 INFO 25496 --- [ main]
> o.s.b.a.e.web.EndpointLinksResolver : Exposing 1 endpoint(s)
> beneath base path '/actuator'
> 2023-04-07 15:53:33.864 INFO 25496 --- [ main] io.undertow
> : starting server: Undertow - 2.2.20.Final
> 2023-04-07 15:53:33.870 INFO 25496 --- [ main] org.xnio
> : XNIO version 3.8.7.Final
> 2023-04-07 15:53:33.877 INFO 25496 --- [ main] org.xnio.nio
> : XNIO NIO Implementation Version
> 3.8.7.Final
> 2023-04-07 15:53:33.982 INFO 25496 --- [ main]
> org.jboss.threads : JBoss Threads version
> 3.1.0.Final
> 2023-04-07 15:53:34.027 INFO 25496 --- [ main]
> o.s.b.w.e.undertow.UndertowWebServer : Undertow started on port(s)
> 8080 (http)
> 2023-04-07 15:53:34.191 INFO 25496 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Routes startup (total:1
> started:1)
> 2023-04-07 15:53:34.192 INFO 25496 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Started hello
> (timer://hello)
> 2023-04-07 15:53:34.195 INFO 25496 --- [ main]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.14.7
> (SampleCamel) started in 162ms (build:16ms init:133ms start:13ms)
> 2023-04-07 15:53:34.214 INFO 25496 --- [ main]
> sample.camel.SampleCamelApplication : Started
> SampleCamelApplication in 2.791 seconds (JVM running for 3.121)
> Hello World
> Hello World
> 2023-04-07 15:53:37.824 INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.14.7
> (SampleCamel) shutting down (timeout:45s)
> 2023-04-07 15:53:37.838 INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Routes stopped (total:1
> stopped:1)
> 2023-04-07 15:53:37.839 INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Stopped hello
> (timer://hello)
> 2023-04-07 15:53:37.844 INFO 25496 --- [ionShutdownHook]
> o.a.c.impl.engine.AbstractCamelContext : Apache Camel 3.14.7
> (SampleCamel) shutdown in 20ms (uptime:3s662ms)
> 2023-04-07 15:53:37.848 INFO 25496 --- [ionShutdownHook] io.undertow
> : stopping server: Undertow - 2.2.20.Final
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD SUCCESS
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time: 9.072 s
> [INFO] Finished at: 2023-04-07T15:53:37-04:00
> [INFO] ------------------------------------------------------------------------
> Terminate batch job (Y/N)?
>
>
>
> ચિરાગ/चिराग/Chirag
> ------------------------------------------
> Sent from My Gmail Account
>
> On Fri, Apr 7, 2023 at 3:38 AM mongoosej <mongoosej@foxmail.com> wrote:
> >
> > Dear Claudio Miranda:
> >
> >
> > &nbsp; I see the examples using spring boot at&nbsp;https://github.com/apache/camel-spring-boot-examples/tree/main/xml-import, and I run this example under JDK1.8 and Camel 3.14.7,
> > but the SpringBoot still report 'circular reference':
> >
> >
> > org.springframework.beans.factory.BeanCurrentlyInCreationException: Error creating bean with name 'SampleCamel': Requested bean is currently in creation: Is there an unresolvable circular reference?
> > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.beforeSingletonCreation(DefaultSingletonBeanRegistry.java:355) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:227) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.15.jar:5.3.15]
> > at org.apache.camel.spring.xml.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:79) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:113) ~[camel-base-engine-3.14.7.jar:3.14.7]
> > at org.apache.camel.spring.xml.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:172) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:378) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.apache.camel.spring.spi.SpringInjector.newInstance(SpringInjector.java:66) ~[camel-spring-3.14.7.jar:3.14.7]
> > at org.apache.camel.support.ResolverHelper.resolveService(ResolverHelper.java:195) ~[camel-support-3.14.7.jar:3.14.7]
> > at org.apache.camel.impl.engine.SimpleCamelContext.createHealthCheckRegistry(SimpleCamelContext.java:126) ~[camel-base-engine-3.14.7.jar:3.14.7]
> > at org.apache.camel.impl.engine.AbstractCamelContext.doBuild(AbstractCamelContext.java:2679) ~[camel-base-engine-3.14.7.jar:3.14.7]
> > at org.apache.camel.spring.SpringCamelContext.doBuild(SpringCamelContext.java:106) ~[camel-spring-3.14.7.jar:3.14.7]
> > at org.apache.camel.support.service.BaseService.build(BaseService.java:63) ~[camel-api-3.14.7.jar:3.14.7]
> > at org.apache.camel.spring.xml.CamelContextFactoryBean.getContext(CamelContextFactoryBean.java:548) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.apache.camel.spring.xml.CamelContextFactoryBean.getContext(CamelContextFactoryBean.java:99) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.getContext(AbstractCamelContextFactoryBean.java:924) ~[camel-core-xml-3.14.7.jar:3.14.7]
> > at org.apache.camel.core.xml.AbstractCamelContextFactoryBean.afterPropertiesSet(AbstractCamelContextFactoryBean.java:191) ~[camel-core-xml-3.14.7.jar:3.14.7]
> > at org.apache.camel.spring.xml.CamelContextFactoryBean.afterPropertiesSet(CamelContextFactoryBean.java:365) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1863) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1800) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:213) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.context.support.AbstractApplicationContext.getBean(AbstractApplicationContext.java:1160) ~[spring-context-5.3.15.jar:5.3.15]
> > at org.apache.camel.spring.xml.CamelBeanPostProcessor$1.getOrLookupCamelContext(CamelBeanPostProcessor.java:79) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.apache.camel.impl.engine.DefaultCamelBeanPostProcessor.postProcessBeforeInitialization(DefaultCamelBeanPostProcessor.java:113) ~[camel-base-engine-3.14.7.jar:3.14.7]
> > at org.apache.camel.spring.xml.CamelBeanPostProcessor.postProcessBeforeInitialization(CamelBeanPostProcessor.java:172) ~[camel-spring-xml-3.14.7.jar:3.14.7]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.applyBeanPostProcessorsBeforeInitialization(AbstractAutowireCapableBeanFactory.java:440) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1796) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:620) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:542) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:335) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:234) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:333) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:208) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:934) ~[spring-beans-5.3.15.jar:5.3.15]
> > at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:918) ~[spring-context-5.3.15.jar:5.3.15]
> > at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:583) ~[spring-context-5.3.15.jar:5.3.15]
> > at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:145) ~[spring-boot-2.6.3.jar:2.6.3]
> > at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:732) [spring-boot-2.6.3.jar:2.6.3]
> > at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:414) [spring-boot-2.6.3.jar:2.6.3]
> > at org.springframework.boot.SpringApplication.run(SpringApplication.java:302) [spring-boot-2.6.3.jar:2.6.3]
> > at org.springframework.boot.SpringApplication.run(SpringApplication.java:1303) [spring-boot-2.6.3.jar:2.6.3]
> > at org.springframework.boot.SpringApplication.run(SpringApplication.java:1292) [spring-boot-2.6.3.jar:2.6.3]
> > at sample.camel.SampleCamelApplication.main(SampleCamelApplication.java:36) [classes/:na]
> >
> >
> > 2023-04-07 15:30:58.278 ERROR 4840 --- [&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;main] o.s.b.d.LoggingFailureAnalysisReporter&nbsp; &nbsp;:&nbsp;
> >
> >
> > ***************************
> > APPLICATION FAILED TO START
> > ***************************
> >
> >
> > Description:
> >
> >
> > The dependencies of some of the beans in the application context form a cycle:
> >
> >
> > &nbsp; &nbsp;template
> > ┌─────┐
> > |&nbsp; SampleCamel
> > ↑&nbsp; &nbsp; &nbsp;↓
> > |&nbsp; org.apache.camel.impl.health.DefaultHealthCheckRegistry
> > └─────┘
> >
> >
> >
> >
> > Action:
> >
> >
> > Relying upon circular references is discouraged and they are prohibited by default. Update your application to remove the dependency cycle between beans. As a last resort, it may be possible to break the cycle automatically by setting spring.main.allow-circular-references to true.
> >
> >
> > &nbsp; Is the version of Camel 3.14.7 exist bug with SpringBoot?
> > &nbsp; How can I solve this problem?
> >
> >
> > &nbsp; Look forward your relpy, thanks.
> >
> >
> >
> >
> >
> >
> >
> > &gt;On Thu, Apr 6, 2023 at 12:30 PM mongoosej <mongoosej@foxmail.com&gt; wrote:
> > &gt;&gt;
> > &gt;&gt; How can I add Routes use Spring DSL when I use SpringBoot?
> > &gt;&gt; In my project, I use SpringBoot not Spring, and I write route use XML not Java DSL, then I get error when I startup my SpringBoot application:
> >
> > &gt;There are several examples using spring boot, please have a look there
> > &gt;https://github.com/apache/camel-spring-boot-examples
> >
> >
> > &gt;--
> > &gt;&nbsp; Claudio Miranda
> >
> > &gt;claudio@claudius.com.br
> > &gt;http://www.claudius.com.br