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

Upgrading SpringBoot 2 app from 7.7 to 7.8 prevents all Camel context to be loaded

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • fuse-7.9-GA
    • fuse-7.8-GA
    • Camel, Spring Boot
    • None
    • False
    • False
    • % %
    • +
    • Undefined
    • Hide
      1. Clone the `https://github.com/agagliardi/camel-springboot-example`
      2. mvn clean compile spring-boot:run and check an output like:

       

      2021-01-18 17:41:42.841  INFO 3749 --- [1 - timer://foo] hello from Java DSL                      : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:42.846  INFO 3749 --- [1 - timer://foo] hello from Camel XML                     : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:42.846  INFO 3749 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:43.809  INFO 3749 --- [1 - timer://foo] hello from Java DSL                      : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:43.810  INFO 3749 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:43.811  INFO 3749 --- [1 - timer://foo] hello from Camel XML                     : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      
      
      1. in `application.properties` uncomment `management.server.port=8081` and run again
      2. the output will be
      2021-01-18 17:41:11.304  INFO 2012 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:12.270  INFO 2012 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:13.271  INFO 2012 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      2021-01-18 17:41:14.271  INFO 2012 --- [1 - timer://foo] hello from Spring XML                    : Exchange[ExchangePattern: InOnly, BodyType: null, Body: [Body is null]]
      

       

       

      Show
      Clone the ` https://github.com/agagliardi/camel-springboot-example ` mvn clean compile spring-boot:run and check an output like:   2021-01-18 17:41:42.841 INFO 3749 --- [1 - timer: //foo] hello from Java DSL : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:42.846 INFO 3749 --- [1 - timer: //foo] hello from Camel XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:42.846 INFO 3749 --- [1 - timer: //foo] hello from Spring XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:43.809 INFO 3749 --- [1 - timer: //foo] hello from Java DSL : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:43.810 INFO 3749 --- [1 - timer: //foo] hello from Spring XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:43.811 INFO 3749 --- [1 - timer: //foo] hello from Camel XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] in `application.properties` uncomment `management.server.port=8081` and run again the output will be 2021-01-18 17:41:11.304 INFO 2012 --- [1 - timer: //foo] hello from Spring XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:12.270 INFO 2012 --- [1 - timer: //foo] hello from Spring XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:13.271 INFO 2012 --- [1 - timer: //foo] hello from Spring XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]] 2021-01-18 17:41:14.271 INFO 2012 --- [1 - timer: //foo] hello from Spring XML : Exchange[ExchangePattern: InOnly, BodyType: null , Body: [Body is null ]]    

      With Fuse 7.7 a SpringBoot 2 application is able to load Camel context from Java, Spring XML and Camel XML but after upgrading just the BOM version to 7.8 is able to load only one of three.

      Empirically It seems the property `management.server.port` to trigger this weird behaviour. Without it, all works fine.

              yfang@redhat.com Freeman(Yue) Fang
              rhn-support-agagliar Antonio Gagliardi
              Francesco Mongiardo Francesco Mongiardo
              Votes:
              1 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: