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

camel run/export --runtime quarkus can't use a route from subdirectory

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 4.8.1
    • None
    • camel-jbang
    • None
    • Unknown

    Description

      I do:
      1. mkdir app
      2. camel init app/hello.yaml
      3. camel run --runtime camel-quarkus app/hello.yaml

      Running using Quarkus v3.15.1 (preparing and downloading files)
      Executing "/home/avano/.sdkman/candidates/java/21.0.5-graal/bin/java -Dquarkus.platform.version=3.15.1 -Dquarkus.application.version=1.0-SNAPSHOT -Dquarkus.platform.artifact-id=quarkus-bom -Dquarkus.platform.group-id=io.quarkus.platform -Dquarkus.application.name=jbang-run-dummy -jar /tmp/.camel-jbang-run/1731334574314/target/quarkus-app/quarkus-run.jar"
      __  ____  __  _____   ___  __ ____  ______ 
       --/ __ \/ / / / _ | / _ \/ //_/ / / / __/ 
       -/ /_/ / /_/ / __ |/ , _/ ,< / /_/ /\ \   
      --\___\_\____/_/ |_/_/|_/_/|_|\____/___/   
      2024-11-11 15:16:22,390 INFO  [org.apa.cam.qua.cor.CamelBootstrapRecorder] (main) Apache Camel Quarkus 3.15.0 is starting
      2024-11-11 15:16:22,392 INFO  [org.apa.cam.mai.MainSupport] (main) Apache Camel (Main) 4.8.0 is starting
      2024-11-11 15:16:22,405 ERROR [org.apa.cam.qua.mai.CamelMainRuntime] (main) Failed to start application: org.apache.camel.RuntimeCamelException: java.io.FileNotFoundException: Resource not found: classpath:camel/app/hello.yaml
      	at org.apache.camel.RuntimeCamelException.wrapRuntimeException(RuntimeCamelException.java:68)
      	at org.apache.camel.main.RoutesConfigurer.configureModeline(RoutesConfigurer.java:366)
      	at org.apache.camel.main.BaseMainSupport.modelineRoutes(BaseMainSupport.java:692)
      	at org.apache.camel.main.BaseMainSupport.autoconfigure(BaseMainSupport.java:535)
      	at org.apache.camel.main.MainSupport.autoconfigure(MainSupport.java:73)
      	at org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:772)
      	at org.apache.camel.quarkus.main.CamelMain.initCamelContext(CamelMain.java:113)
      	at org.apache.camel.quarkus.main.CamelMain.doInit(CamelMain.java:83)
      	at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
      	at org.apache.camel.quarkus.main.CamelMain.startEngine(CamelMain.java:134)
      	at org.apache.camel.quarkus.main.CamelMainRuntime.start(CamelMainRuntime.java:49)
      	at org.apache.camel.quarkus.core.CamelBootstrapRecorder.start(CamelBootstrapRecorder.java:45)
      	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy_0(Unknown Source)
      	at io.quarkus.deployment.steps.CamelBootstrapProcessor$boot173480958.deploy(Unknown Source)
      	at io.quarkus.runner.ApplicationImpl.doStart(Unknown Source)
      	at io.quarkus.runtime.Application.start(Application.java:101)
      	at io.quarkus.runtime.ApplicationLifecycleManager.run(ApplicationLifecycleManager.java:119)
      	at io.quarkus.runtime.Quarkus.run(Quarkus.java:71)
      	at io.quarkus.runtime.Quarkus.run(Quarkus.java:44)
      	at io.quarkus.runtime.Quarkus.run(Quarkus.java:124)
      	at io.quarkus.runner.GeneratedMain.main(Unknown Source)
      	at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:103)
      	at java.base/java.lang.reflect.Method.invoke(Method.java:580)
      	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.doRun(QuarkusEntryPoint.java:62)
      	at io.quarkus.bootstrap.runner.QuarkusEntryPoint.main(QuarkusEntryPoint.java:33)
      Caused by: java.io.FileNotFoundException: Resource not found: classpath:camel/app/hello.yaml
      	at org.apache.camel.dsl.yaml.YamlRoutesBuilderLoader.preParseRoute(YamlRoutesBuilderLoader.java:976)
      	at org.apache.camel.main.RoutesConfigurer.doConfigureModeline(RoutesConfigurer.java:425)
      	at org.apache.camel.main.RoutesConfigurer.configureModeline(RoutesConfigurer.java:352)
      	... 23 more
      

      Also when I do camel export --runtime quarkus --dir app/export app/hello.yaml, hello.yaml is placed in src/main/resources/camel, but the content of application.properties is:

      quarkus.native.resources.includes=camel/app/hello.yaml
      camel.main.routes-include-pattern=camel/app/hello.yaml
      

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              avano Andrej Vano
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

                Created:
                Updated: