Marco Carletti created CAMEL-20939:
--------------------------------------
Summary: 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
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)