[ https://issues.apache.org/jira/browse/CAMEL-21572?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17908356#comment-17908356 ]
Bartosz Popiela commented on CAMEL-21572: ----------------------------------------- PFA pull requests with the fix. > Camel JBang with --runtime=spring-boot throw NullPointerException > ----------------------------------------------------------------- > > Key: CAMEL-21572 > URL: https://issues.apache.org/jira/browse/CAMEL-21572 > Project: Camel > Issue Type: Bug > Components: camel-jbang > Affects Versions: 4.8.2, 4.9.0 > Reporter: Bartosz Popiela > Priority: Minor > Fix For: 4.8.3, 4.10.0 > > > SetHeader with a simple expression causes NullPointerException to be thrown > because for runtime other than default (kamelet-main) JBang uses Stub instead > of the actual component. > Run the following command ro reproduce: > {code:java} > jbang camel@apache/camel run * --runtime=spring-boot > {code} > {code:yaml} > - route: > id: route-603e > nodePrefixId: route-b8d > from: > id: from-6ff9 > uri: timer > parameters: > delay: "0" > timerName: oneTimeTimer > repeatCount: "1" > steps: > - setHeader: > id: setHeader-c0db > name: SampleUUID > expression: > simple: > id: simple-536b > expression: >- > This is a sample UUID: > ${bean:type:java.util.UUID?method=randomUUID} > - log: > id: log-3213 > message: ${header.SampleUUID} > {code} -- This message was sent by Atlassian Jira (v8.20.10#820010)