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

Camel-Jbang does not add camel-openapi-java component when required

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.18.3
    • 3.18.4, 3.20.0
    • camel-jbang
    • None
    • Unknown

    Description

      The following yaml:

      - route:
          from:
            uri: direct:greeting
            steps:
              - log:
                  message: ${headers}
              - setBody:
                  expression:
                    simple:
                      expression: ${header.name} says hi
              - log:
                  message: $body}
          id: greeting
      - rest:
          get:
            - path: /greeting/{name}
              to: direct:greeting
          apiDocs: true
      - restConfiguration:
          component: platform-http
          apiContextPath: /api
          contextPath: /rest
      

      fails to run with an exception:

      org.apache.camel.FailedToStartRouteException: Failed to start route route1 because of null
              at org.apache.camel.impl.engine.RouteService.warmUp(RouteService.java:123)
              at org.apache.camel.impl.engine.InternalRouteStartupManager.doWarmUpRoutes(InternalRouteStartupManager.java:306)
              at org.apache.camel.impl.engine.InternalRouteStartupManager.safelyStartRouteServices(InternalRouteStartupManager.java:189)
              at org.apache.camel.impl.engine.InternalRouteStartupManager.doStartOrResumeRoutes(InternalRouteStartupManager.java:147)
              at org.apache.camel.impl.engine.AbstractCamelContext.doStartCamel(AbstractCamelContext.java:3365)
              at org.apache.camel.impl.engine.AbstractCamelContext.doStartContext(AbstractCamelContext.java:3033)
              at org.apache.camel.impl.engine.AbstractCamelContext.doStart(AbstractCamelContext.java:2988)
              at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
              at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2649)
              at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:262)
              at org.apache.camel.main.KameletMain.doStart(KameletMain.java:237)
              at org.apache.camel.support.service.BaseService.start(BaseService.java:119)
              at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:579)
              at org.apache.camel.dsl.jbang.core.commands.Run.call(Run.java:208)
              at org.apache.camel.dsl.jbang.core.commands.Run.call(Run.java:73)
              at picocli.CommandLine.executeUserObject(CommandLine.java:1953)
              at picocli.CommandLine.access$1300(CommandLine.java:145)
              at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2358)
              at picocli.CommandLine$RunLast.handle(CommandLine.java:2352)
              at picocli.CommandLine$RunLast.handle(CommandLine.java:2314)
              at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2179)
              at picocli.CommandLine$RunLast.execute(CommandLine.java:2316)
              at picocli.CommandLine.execute(CommandLine.java:2078)
              at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:47)
              at main.CamelJBang.main(CamelJBang.java:36)
      Caused by: org.apache.camel.RuntimeCamelException: java.lang.IllegalStateException: Cannot find RestApiProcessorFactory in Registry or classpath (such as the camel-openapi-java component)
      

      Attachments

        Activity

          People

            davsclaus Claus Ibsen
            marat.gubaidullin@gmail.com Marat Gubaidullin
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: