[ https://issues.apache.org/jira/browse/CAMEL-20939?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17862790#comment-17862790 ]
Claus Ibsen commented on CAMEL-20939: ------------------------------------- It works now for 4.7.0 {code} 2024-07-03 15:38:09.633 INFO 47425 --- [4 - timer://xml] helloName.xml:35 : Hello Camel from Jenna 2024-07-03 15:38:10.619 INFO 47425 --- [4 - timer://xml] helloName.xml:35 : Hello Camel from Jenna ^C2024-07-03 15:38:10.762 INFO 47425 --- [ main] e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.7.0-SNAPSHOT (helloName) is shutting down (timeout:45s) 2024-07-03 15:38:10.770 INFO 47425 --- [ main] e.camel.impl.engine.AbstractCamelContext : Routes stopped (total:1) 2024-07-03 15:38:10.770 INFO 47425 --- [ main] e.camel.impl.engine.AbstractCamelContext : Stopped xml (timer://xml) 2024-07-03 15:38:10.776 INFO 47425 --- [ntloop-thread-0] tform.http.vertx.VertxPlatformHttpServer : Vert.x HttpServer stopped 2024-07-03 15:38:10.780 INFO 47425 --- [ main] e.camel.impl.engine.AbstractCamelContext : Apache Camel 4.7.0-SNAPSHOT (helloName) shutdown in 17ms (uptime:2s) 2024-07-03 15:38:10.780 INFO 47425 --- [ main] org.apache.camel.main.MainSupport : Apache Camel (JBang) 4.7.0-SNAPSHOT shutdown ~/workspace/deleteme ❯ camel run helloName.xml --profile=test {code} > camel-jbang - unable to load profile > ------------------------------------ > > Key: CAMEL-20939 > URL: https://issues.apache.org/jira/browse/CAMEL-20939 > Project: Camel > Issue Type: Bug > Components: camel-jbang > Affects Versions: 4.6.0 > Reporter: Marco Carletti > Assignee: Claus Ibsen > Priority: Major > Fix For: 4.7.0 > > Attachments: application-test.properties, helloName.xml > > > According to > [documentation|https://camel.apache.org/manual/camel-jbang.html#_using_profiles] > it is possible to select profile and to use a specific configuration file > but currently the command > {code:bash} > camel run --profile=test helloName.xml > {code} > fails with > {code:bash} > java.lang.NullPointerException: Cannot invoke > "java.util.Properties.putAll(java.util.Map)" because "answer" is null > at > org.apache.camel.dsl.jbang.core.commands.Run.loadProfileProperties(Run.java:1056) > at org.apache.camel.dsl.jbang.core.commands.Run.run(Run.java:418) > at org.apache.camel.dsl.jbang.core.commands.Run.doCall(Run.java:315) > 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:2041) > at picocli.CommandLine.access$1500(CommandLine.java:148) > at > picocli.CommandLine$RunLast.executeUserObjectOfLastSubcommandWithSameParent(CommandLine.java:2461) > at picocli.CommandLine$RunLast.handle(CommandLine.java:2453) > at picocli.CommandLine$RunLast.handle(CommandLine.java:2415) > at > picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:2273) > at picocli.CommandLine$RunLast.execute(CommandLine.java:2417) > at picocli.CommandLine.execute(CommandLine.java:2170) > at > org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:165) > at > org.apache.camel.dsl.jbang.core.commands.CamelJBangMain.run(CamelJBangMain.java:61) > at main.CamelJBang.main(CamelJBang.java:36) > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)