[ 
https://issues.apache.org/jira/browse/CAMEL-21794?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17939262#comment-17939262
 ] 

Marat Gubaidullin commented on CAMEL-21794:
-------------------------------------------

{{Same issue in Kamelets even with --lazy-bean}}
{code:java}
  template:
    beans:
      - name: connectionFactoryBean
        type: 
"#class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory"
        properties:
          brokerURL: "{{env:ARTEMIS_BROKER:tcp://artemis:61616}}"
          user: "{{env:ARTEMIS_USER:artemis}}"
          password: "{{env:ARTEMIS_PASSWORD:artemis}}"
{code}
Error
{noformat}
Caused by: org.apache.camel.PropertyBindingException: Error binding property 
(brokerURL=@@CamelMagicValue@@) with name: brokerURL on bean: 
ActiveMQConnectionFactory [serverLocator=ServerLocatorImpl 
[initialConnectors=[TransportConfiguration(name=null, 
factory=org-apache-activemq-artemis-core-remoting-impl-netty-NettyConnectorFactory)?port=61616&host=localhost],
 discoveryGroupConfiguration=null], clientID=null, consumerWindowSize=1048576, 
dupsOKBatchSize=1048576, transactionBatchSize=1048576, readOnly=false, 
EnableSharedClientID=false] with value: @@CamelMagicValue@@
{noformat}

> camel-jbang - Export bean with lazy-bean should not initialize the bean if 
> not needed
> -------------------------------------------------------------------------------------
>
>                 Key: CAMEL-21794
>                 URL: https://issues.apache.org/jira/browse/CAMEL-21794
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-jbang
>    Affects Versions: 4.8.3, 4.10.0
>            Reporter: Claus Ibsen
>            Assignee: Claus Ibsen
>            Priority: Major
>             Fix For: 4.10.1, 4.11.0
>
>
> If you export a bean with Artemis broker then it initailizes the bean and 
> Artemis fails when calling setBroker as it does some validation in their 
> setter :(
> {code:java}
> - route:
>     id: route-92b5
>     nodePrefixId: route-8c8
>     from:
>       id: from-2ffb
>       uri: timer
>       steps:
>         - log:
>             id: log-82a7
>             message: ${body}
> - beans:
>     - name: JMSArtemis
>       type: 
> "#class:org.apache.activemq.artemis.jms.client.ActiveMQConnectionFactory"
>       properties:
>         brokerURL: "{{secret:artemis/brokerURL}}"
>         user: "{{secret:artemis/user}}"
>         password: "{{secret:artemis/password}}" {code}



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to