Marat Gubaidullin created CAMEL-19592:
-----------------------------------------

             Summary: No bean could be found in the registry for: 
platform-http-router
                 Key: CAMEL-19592
                 URL: https://issues.apache.org/jira/browse/CAMEL-19592
             Project: Camel
          Issue Type: Bug
          Components: camel-jbang, camel-main
    Affects Versions: 3.21.0
            Reporter: Marat Gubaidullin


Simple rest service:

{code:java}
- 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
{code}

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:

{code:java}
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:?]
{code}




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to