[
https://issues.apache.org/jira/browse/CAMEL-26526?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18137884#comment-18137884
]
Guillaume Nodet commented on CAMEL-26526:
-----------------------------------------
This issue is being investigated by a coding agent (on behalf of gnodet).
Root cause identified: commit cbfee553a489 (CAMEL-25397, Oct 16, 2026)
introduced a hasNoRoutes() check in KameletMainIntegration. When camel run is
given a .kamelet.yaml file, KameletRoutesBuilderLoader creates a *route
template* (not a route). Since no other file references the kamelet URI, the
template is never instantiated into an actual route. The hasNoRoutes() check
sees getRoutes().isEmpty() == true and shuts down with "No routes found". This
matches the observed symptom: "Routes startup total:0" followed by immediate
shutdown.
Fix: modify hasNoRoutes() to also check getRouteTemplateDefinitions() -- if
route templates exist, the context has loaded something meaningful and should
not be treated as empty. Single-PR scope in KameletMainIntegration.java.
_Note: This comment was generated by an AI coding agent and requires manual
verification._
> LocalKamaletsITCase.localKameletRunTest is broken on main branch
> ----------------------------------------------------------------
>
> Key: CAMEL-26526
> URL: https://issues.apache.org/jira/browse/CAMEL-26526
> Project: Camel
> Issue Type: Test
> Components: camel-jbang
> Affects Versions: 4.24.0
> Reporter: Aurélien Pupier
> Assignee: Guillaume Nodet
> Priority: Major
>
> it has failed 19 times in a row:
> {noformat}
> command camel run --local-kamelet-dir=/deployments/data/13c1d59230418
> /deployments/data/13c1d59230418/user-source.kamelet.yaml --background failed
> with output Running Camel Main: user-source in background with PID: 1272
> (waiting to startup)
> Log: /home/jbang/.camel/1272-run.log
> 2026-11-02 15:55:05.253 INFO 1272 --- [ main]
> org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.24.0-SNAPSHOT is
> starting
> 2026-11-02 15:55:14.198 INFO 1272 --- [ main]
> org.apache.camel.main.MainSupport : Running Linux 5.15.0-202-generic (amd64)
> 2026-11-02 15:55:14.199 INFO 1272 --- [ main]
> org.apache.camel.main.MainSupport : Using Java 21.0.12.1 (OpenJDK 64-Bit
> Server VM) with PID 1272
> 2026-11-02 15:55:14.199 INFO 1272 --- [ main]
> org.apache.camel.main.MainSupport : Started by jbang in /home/jbang
> 2026-11-02 15:55:19.945 INFO 1272 --- [ main]
> apache.camel.main.ProfileConfigurer : The application is starting with
> profile: dev
> 2026-11-02 15:55:22.514 WARN 1272 --- [ main]
> sl.yaml.common.YamlDeserializerBase : YAML DSL compact notation detected in:
> file:/deployments/data/13c1d59230418/user-source.kamelet.yaml. It is
> recommended to use canonical/normalized YAML DSL notation which is more
> tooling and AI friendly. Use Camel CLI to normalize: camel validate normalize
> <file>
> 2026-11-02 15:55:27.796 INFO 1272 --- [ main]
> .download.MavenDependencyDownloader : Resolved:
> org.apache.camel:camel-http:4.24.0-SNAPSHOT (took: 3s759ms)
> 2026-11-02 15:55:28.830 INFO 1272 --- [ main]
> mel.cli.connector.LocalCliConnector : Camel CLI connector enabled
> 2026-11-02 15:55:29.395 INFO 1272 --- [ main]
> el.impl.engine.AbstractCamelContext : Apache Camel 4.24.0-SNAPSHOT
> (user-source) is starting
> 2026-11-02 15:55:31.296 INFO 1272 --- [ main]
> el.impl.engine.AbstractCamelContext : Routes startup (total:0)
> 2026-11-02 15:55:31.297 INFO 1272 --- [ main]
> el.impl.engine.AbstractCamelContext : Apache Camel 4.24.0-SNAPSHOT
> (user-source) started in 1s901ms (build:0ms init:0ms start:1s901ms
> boot:24s135ms)
> ERROR: No routes found in:
> /deployments/data/13c1d59230418/user-source.kamelet.yaml
> 2026-11-02 15:55:31.302 INFO 1272 --- [ main]
> el.impl.engine.AbstractCamelContext : Apache Camel 4.24.0-SNAPSHOT
> (user-source) is shutting down (timeout:10s)
> 2026-11-02 15:55:31.304 INFO 1272 --- [ main]
> el.impl.engine.AbstractCamelContext : Routes stopped (total:0)
> 2026-11-02 15:55:31.316 INFO 1272 --- [ main]
> el.impl.engine.AbstractCamelContext : Apache Camel 4.24.0-SNAPSHOT
> (user-source) shutdown in 14ms (uptime:1s)
> and error ERROR: Camel Main: user-source startup failure
> {noformat}
--
This message was sent by Atlassian Jira
(v10.3.26#10030026)