[
https://issues.apache.org/jira/browse/CAMEL-22809?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18048744#comment-18048744
]
Claus Ibsen commented on CAMEL-22809:
-------------------------------------
what camel-jbang version do you use, what is show when you run
camel version
> camel-main export failing to run when using --observe
> -----------------------------------------------------
>
> Key: CAMEL-22809
> URL: https://issues.apache.org/jira/browse/CAMEL-22809
> Project: Camel
> Issue Type: Bug
> Components: camel-jbang
> Affects Versions: 4.14.3
> Reporter: Cameron Fitzwater
> Priority: Minor
> Fix For: 4.14.4, 4.18.0
>
>
> An exported project that uses the `--runtime=camel-main` with the `–observe`
> flag is failing to run successfully:
> {code:java}
> Exception in thread "main" java.lang.NullPointerException: Cannot invoke
> "java.util.Properties.containsKey(Object)" because "this.initialProperties"
> is null
> at
> org.apache.camel.main.BaseMainSupport.lambda$configurePropertiesService$0(BaseMainSupport.java:449)
> at
> java.base/java.util.concurrent.ConcurrentHashMap.forEach(ConcurrentHashMap.java:1603)
> at java.base/java.util.Properties.forEach(Properties.java:1467)
> at
> org.apache.camel.main.BaseMainSupport.configurePropertiesService(BaseMainSupport.java:448)
> at
> org.apache.camel.main.MainCommandLineSupport.configurePropertiesService(MainCommandLineSupport.java:252)
> at
> org.apache.camel.main.BaseMainSupport.postProcessCamelContext(BaseMainSupport.java:919)
> at
> org.apache.camel.main.MainSupport.initCamelContext(MainSupport.java:352)
> at org.apache.camel.main.Main.doInit(Main.java:133)
> at
> org.apache.camel.support.service.BaseService.init(BaseService.java:85)
> at org.apache.camel.main.MainSupport.run(MainSupport.java:90)
> at
> org.apache.camel.main.MainCommandLineSupport.run(MainCommandLineSupport.java:238)
> at
> org.example.project.hello.CamelApplication.main(CamelApplication.java:9)
> {code}
>
> *Reproducible with:*
> {code:java}
> camel init hello.yaml
> camel export hello.yaml --camel-version=4.14.3 --dir=../export --clean-dir
> --build-tool=maven --runtime=camel-main --observe
> cd ../export
> ./mvnw clean package
> java -jar target/hello-1.0-SNAPSHOT.jar
> {code}
>
>
--
This message was sent by Atlassian Jira
(v8.20.10#820010)