Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-15472

Spring Boot Example project does not run

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Information Provided
    • Affects Version/s: 3.4.3
    • Fix Version/s: None
    • Labels:
      None
    • Estimated Complexity:
      Unknown

      Description

      Hi! I'm currently looking through your examples for Camel Spring Boot integration and am having an issue with getting Camel SB Examples :: REST DSL and OpenApi to run. As you may recall from https://issues.apache.org/jira/browse/CAMEL-15465 I've switched the version of the root project to 3.4.3 to get the examples to build. I can build the projects fine now. However when I try to run the mentioned example (via mvn spring-boot:run) I get the following exceptions at startup:

      {{org.apache.camel.FailedToStartRouteException: Failed to start route route1 because of null}}
      {{ {{ at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:125) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.InternalRouteStartupManager.doWarmUpRoutes(InternalRouteStartupManager.java:263) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:156) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:114) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:2809) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:2657) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2620) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.spring.boot.SpringBootCamelContext.doStart(SpringBootCamelContext.java:43) ~[camel-spring-boot-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2452) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.spring.SpringCamelContext.start(SpringCamelContext.java:121) ~[camel-spring-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.spring.SpringCamelContext.onApplicationEvent(SpringCamelContext.java:157) ~[camel-spring-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.springframework.context.event.SimpleApplicationEventMulticaster.doInvokeListener(SimpleApplicationEventMulticaster.java:172) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.context.event.SimpleApplicationEventMulticaster.invokeListener(SimpleApplicationEventMulticaster.java:165) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.context.event.SimpleApplicationEventMulticaster.multicastEvent(SimpleApplicationEventMulticaster.java:139) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:404) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.context.support.AbstractApplicationContext.publishEvent(AbstractApplicationContext.java:361) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.context.support.AbstractApplicationContext.finishRefresh(AbstractApplicationContext.java:898) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:554) ~[spring-context-5.2.8.RELEASE.jar:5.2.8.RELEASE]}}}}
      {{ {{ at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:143) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:758) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:750) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.springframework.boot.SpringApplication.run(SpringApplication.java:315) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1237) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.springframework.boot.SpringApplication.run(SpringApplication.java:1226) ~[spring-boot-2.3.2.RELEASE.jar:2.3.2.RELEASE]}}}}
      {{ {{ at org.apache.camel.example.springboot.Application.main(Application.java:30) ~[classes/:na]}}}}
      {{ Caused by: org.apache.camel.RuntimeCamelException: java.lang.IllegalStateException: Cannot find RestApiProcessorFactory in Registry or classpath (such as the camel-openapi-java component)}}
      {{ {{ at org.apache.camel.RuntimeCamelException.wrapRuntimeCamelException(RuntimeCamelException.java:52) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:67) ~[camel-support-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:101) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.processor.channel.DefaultChannel.doStart(DefaultChannel.java:143) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:87) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.processor.Pipeline.doStart(Pipeline.java:154) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.processor.DelegateAsyncProcessor.doStart(DelegateAsyncProcessor.java:78) ~[camel-support-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.RouteService.startChildService(RouteService.java:334) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.RouteService.doWarmUp(RouteService.java:184) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:123) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ ... 26 common frames omitted}}}}
      {{ Caused by: java.lang.IllegalStateException: Cannot find RestApiProcessorFactory in Registry or classpath (such as the camel-openapi-java component)}}
      {{ {{ at org.apache.camel.component.rest.RestApiEndpoint.createProducer(RestApiEndpoint.java:207) ~[camel-rest-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.DefaultEndpoint.createAsyncProducer(DefaultEndpoint.java:200) ~[camel-support-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.processor.SendProcessor.doStart(SendProcessor.java:232) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.BaseService.start(BaseService.java:115) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:84) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:101) ~[camel-api-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.processor.errorhandler.RedeliveryErrorHandler.doStart(RedeliveryErrorHandler.java:1459) ~[camel-base-3.4.3.jar:3.4.3]}}}}
      {{ {{ at org.apache.camel.support.ChildServiceSupport.start(ChildServiceSupport.java:60) ~[camel-support-3.4.3.jar:3.4.3]}}}}

      I tried adding a dependency to camel-openapi-java, but still get the same error. Maybe you could point me in the right direction here.

       

      Cheers!

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              franz.lanzendorfer Franz J. Lanzendorfer
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: