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

camel-jbang - Export to camel-main should include platform-http for rest-dsl

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.21.0
    • 4.0-RC2, 4.0.0
    • camel-jbang, camel-main
    • None
    • Unknown

    Description

      Simple rest service:

      - rest:
          id: rest-f5bd
          get:
            - id: get-42e8
              path: /demo
              to: direct:demo
      - route:
          id: demo
          from:
            uri: direct
            id: from-7fa8
            parameters:
              name: demo
            steps:
              - setBody:
                  id: setBody-064f
                  expression:
                    simple:
                      expression: Hello
                      id: simple-6888
      

      1. When run with jbang works fine.
      2. When export to with `camel.jbang.runtime=camel-main` and `mvn clean package` and `java -jar target/xxx-runner.jar` throws an exception:

      2023-07-07 15:03:34.036 ERROR 59377 --- [           main] el.impl.engine.AbstractCamelContext : Error starting CamelContext (camel-1) due to exception thrown: No bean could be found in the registry for: platform-http-router of type: org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter
      org.apache.camel.NoSuchBeanException: No bean could be found in the registry for: platform-http-router of type: org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter
              at org.apache.camel.support.CamelContextHelper.mandatoryLookup(CamelContextHelper.java:240) ~[karavan-1-runner.jar:?]
              at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpRouter.lookup(VertxPlatformHttpRouter.java:290) ~[karavan-1-runner.jar:?]
              at org.apache.camel.component.platform.http.vertx.VertxPlatformHttpConsumer.doInit(VertxPlatformHttpConsumer.java:99) ~[karavan-1-runner.jar:?]
              at org.apache.camel.support.service.BaseService.init(BaseService.java:83) ~[karavan-1-runner.jar:?]
              at org.apache.camel.support.service.BaseService.start(BaseService.java:111) ~[karavan-1-runner.jar:?]
              at org.apache.camel.support.service.ServiceHelper.startService(ServiceHelper.java:113) ~[karavan-1-runner.jar:?]
              at org.apache.camel.component.platform.http.PlatformHttpConsumer.doStart(PlatformHttpConsumer.java:53) ~[karavan-1-runner.jar:?]
              at org.apache.camel.support.service.BaseService.start(BaseService.java:119) ~[karavan-1-runner.jar:?]
      

      Attachments

        Issue Links

          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: