Error message 'Requested bean is currently in creation: Is there an unresolvable circular reference?' while migration from Fuse to Camel for Spring Boot

Solution Verified - Updated -

Issue

  • Observed an error message at the start the application:
2023-04-21T08:31:37.325+02:00 - WARN  [main] - [org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:591)]: Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'app1': Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'app': Invocation of init method failed; nested exception 

APPLICATION FAILED TO START
Description:
The dependencies of some of the beans in the application context form a cycle:

   appName
┌─────┐
|  app1
↑     ↓
|  org.apache.camel.impl.test.app
└─────┘

Environment

  • Camel for Spring Boot
    • 3.18.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content