Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-8262

camel-core WARN No CamelContext defined yet so cannot inject into bean

    XMLWordPrintable

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Done
    • fuse-7.0
    • fuse-7.2
    • FIS-Camel
    • None
    • % %
    • Fuse 7.0 Sprint 27, Fuse 7.2 Sprint 36

    Description

      Having class like:

      @SpringBootApplication
      public class FileCbrRoute {
      
      	// must have a main method spring-boot can run
      	public static void main(String[] args) {
      		SpringApplication.run(FileCbrRoute.class, args);
      	}
      
      	@Component
      	class FileRouter extends RouteBuilder {
      
      		@Override
      		public void configure() throws Exception {
      			// take file and route it based on filename extension to appropriate output directory
      			from("file:{{env:JAVA_DATA_DIR}}/in?noop=true")
      					.log("Logging headers: ${headers}")
      					.choice()
      					.when(header("CamelFileNameOnly").endsWith(".txt")).to("file:{{env:JAVA_DATA_DIR}}/out/txt?autoCreate=true")
      					.when(header("CamelFileNameOnly").endsWith(".xml")).to("file:{{env:JAVA_DATA_DIR}}/out/xml?autoCreate=true");
      		}
      	}
      }
      
      

      leads to warning:

      WARN  o.a.c.i.DefaultCamelBeanPostProcessor - No CamelContext defined yet so cannot inject into bean: routesHealthCheckRepository'
      

      Attachments

        Issue Links

          Activity

            People

              lburgazz@redhat.com Luca Burgazzoli
              llowinge@redhat.com Lukas Lowinger
              Lukas Lowinger Lukas Lowinger
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: