Details
-
Bug
-
Status: Resolved
-
Minor
-
Resolution: Fixed
-
4.8.1
-
None
-
Unknown
Description
This example does not work on 4.8.2 but works in 4.9.0
https://github.com/apache/camel-kamelets-examples/tree/main/jbang/route-template
jbang "-Dcamel.jbang.version=4.8.2-SNAPSHOT" camel@apache/camel run *
[jbang] Resolving dependencies...
[jbang] org.apache.camel:camel-jbang-core:4.8.2-SNAPSHOT
[jbang] org.apache.camel.kamelets:camel-kamelets:4.8.1
[jbang] org.apache.camel:camel-bom:4.8.2-SNAPSHOT@pom
[jbang] Dependencies resolved
2024-11-28 18:13:39.869 INFO 69872 --- [ main] org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.8.2-SNAPSHOT is starting
2024-11-28 18:13:39.906 INFO 69872 --- [ main] org.apache.camel.main.MainSupport : Additional files added to classpath: mytemplate.camel.yaml
2024-11-28 18:13:40.005 INFO 69872 --- [ main] org.apache.camel.main.MainSupport : Using Java 17.0.11 with PID 69872. Started by davsclaus in /Users/davsclaus/workspace/camel-kamelets-examples/jbang/route-template
2024-11-28 18:13:40.067 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : Properties location: file:application.properties
2024-11-28 18:13:40.105 INFO 69872 --- [ main] org.apache.camel.main.ProfileConfigurer : The application is starting with profile: dev
2024-11-28 18:13:40.150 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : Auto-configuration summary
2024-11-28 18:13:40.150 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : [application.properties] camel.routeTemplate[one].drink = Heineken
2024-11-28 18:13:40.150 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : [application.properties] camel.routeTemplate[one].templateId = myTemplate
2024-11-28 18:13:40.150 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : [application.properties] camel.routeTemplate[two].drink = Cosmopolitan
2024-11-28 18:13:40.150 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : [application.properties] camel.routeTemplate[two].period = 7000
2024-11-28 18:13:40.150 INFO 69872 --- [ main] org.apache.camel.main.BaseMainSupport : [application.properties] camel.routeTemplate[two].templateId = myTemplate
2024-11-28 18:13:40.273 INFO 69872 --- [ main] he.camel.cli.connector.LocalCliConnector : Camel JBang CLI enabled
java.lang.IllegalArgumentException: Cannot find RouteTemplate with id myTemplate
at org.apache.camel.impl.DefaultModel.addRouteFromTemplate(DefaultModel.java:455)
at org.apache.camel.impl.DefaultModel.addRouteFromTemplate(DefaultModel.java:406)
at org.apache.camel.impl.DefaultCamelContext.addRouteFromTemplate(DefaultCamelContext.java:355)
at org.apache.camel.impl.engine.AbstractCamelContext.doInit(AbstractCamelContext.java:2426)
at org.apache.camel.support.service.BaseService.init(BaseService.java:85)
at org.apache.camel.impl.engine.AbstractCamelContext.init(AbstractCamelContext.java:2068)
at org.apache.camel.support.service.BaseService.start(BaseService.java:115)
at org.apache.camel.impl.engine.AbstractCamelContext.start(AbstractCamelContext.java:2087)
at org.apache.camel.impl.DefaultCamelContext.start(DefaultCamelContext.java:211)
at org.apache.camel.main.KameletMain.doStart(KameletMain.java:373)
at org.apache.camel.support.service.BaseService.start(BaseService.java:123)
at org.apache.camel.dsl.jbang.core.commands.Run.runKameletMain(Run.java:1348)
at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:864)
at org.apache.camel.dsl.jbang.core.commands.Run.doCall(Run.java:319)
at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:71)
at org.apache.camel.dsl.jbang.core.commands.CamelCommand.call(CamelCommand.java:37)
at picocli.CommandLine.executeUserObject(CommandLine.java:2045)
at picocli.CommandLine.access$1500(CommandLine.java:148)
at picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2465)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2457)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2419)
at picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2277)
at picocli.CommandLine$RunLast.execute(CommandLine.java:2421)
at picocli.CommandLine.execute(CommandLine.java:2174)
at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:173)
at org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:62)
at main.CamelJBang.main(CamelJBang.java:36)