Uploaded image for project: 'Red Hat Fuse'
  1. Red Hat Fuse
  2. ENTESB-6375

[6.3.0 R1] Placeholders in blueprint are not correctly parsed

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Critical Critical
    • None
    • jboss-fuse-6.3
    • Camel, Fabric8 v1, Karaf
    • % %
    • Hide
      1. create Fabric
      2. create 2 brokers:
        container-create-child root broker 2
        mq-create --no-ssl --group default gg-inbound-broker1
        profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker1/openwire-port=61618 mq-broker-default.gg-inbound-broker1
        profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker1/standalone=true mq-broker-default.gg-inbound-broker1
        
        mq-create --no-ssl --group default gg-inbound-broker2
        profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker2/openwire-port=61619 mq-broker-default.gg-inbound-broker2
        profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker2/standalone=true mq-broker-default.gg-inbound-broker2
        
        container-add-profile broker1 mq-broker-default.gg-inbound-broker1 
        container-add-profile broker2 mq-broker-default.gg-inbound-broker2 
        
      3. create profile:
        fabric:profile-create --parent feature-cxf --parent feature-camel --parent mq-client customer
        fabric:profile-edit -f camel-amq -f camel-jms -f activemq-camel -f camel-jackson customer
        fabric:profile-edit -b mvn:org.jboss.fuse.qa.fabric/xlate-customer/1.0 customer
        fabric:profile-edit --pid in.activemq/activemq.host=localhost --pid in.activemq/activemq.port=61618 customer
        fabric:profile-edit --pid out.activemq/activemq.host=localhost --pid out.activemq/activemq.port=61629 customer
        fabric:profile-edit --pid in.topic/in.queue.name.calcium=Consumer.A.VirtualTopic.Calcium --pid in.topic/in.queue.name.cholesterol=Consumer.A.VirtualTopic.Cholesterol  customer
        fabric:profile-edit --pid in.topic/in.queue.name.glucose=Consumer.A.VirtualTopic.Glucose --pid in.topic/in.queue.name.pressure=Consumer.A.VirtualTopic.Pressure  customer
        fabric:profile-edit --pid out.topic/out.topic.name=VirtualTopic.Customer customer
        fabric:profile-edit --pid out.topic/deliveries=5 --pid out.topic/delay=30000 custome
        
      4. deploy customer profile on new child container and check log
      Show
      create Fabric create 2 brokers: container-create-child root broker 2 mq-create --no-ssl --group default gg-inbound-broker1 profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker1/openwire-port=61618 mq-broker- default .gg-inbound-broker1 profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker1/standalone= true mq-broker- default .gg-inbound-broker1 mq-create --no-ssl --group default gg-inbound-broker2 profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker2/openwire-port=61619 mq-broker- default .gg-inbound-broker2 profile-edit --pid io.fabric8.mq.fabric.server-gg-inbound-broker2/standalone= true mq-broker- default .gg-inbound-broker2 container-add-profile broker1 mq-broker- default .gg-inbound-broker1 container-add-profile broker2 mq-broker- default .gg-inbound-broker2 create profile: fabric:profile-create --parent feature-cxf --parent feature-camel --parent mq-client customer fabric:profile-edit -f camel-amq -f camel-jms -f activemq-camel -f camel-jackson customer fabric:profile-edit -b mvn:org.jboss.fuse.qa.fabric/xlate-customer/1.0 customer fabric:profile-edit --pid in.activemq/activemq.host=localhost --pid in.activemq/activemq.port=61618 customer fabric:profile-edit --pid out.activemq/activemq.host=localhost --pid out.activemq/activemq.port=61629 customer fabric:profile-edit --pid in.topic/in.queue.name.calcium=Consumer.A.VirtualTopic.Calcium --pid in.topic/in.queue.name.cholesterol=Consumer.A.VirtualTopic.Cholesterol customer fabric:profile-edit --pid in.topic/in.queue.name.glucose=Consumer.A.VirtualTopic.Glucose --pid in.topic/in.queue.name.pressure=Consumer.A.VirtualTopic.Pressure customer fabric:profile-edit --pid out.topic/out.topic.name=VirtualTopic.Customer customer fabric:profile-edit --pid out.topic/deliveries=5 --pid out.topic/delay=30000 custome deploy customer profile on new child container and check log

      There is a new regression in 6.3.0 211 R1 build in resolving placeholders in blueprint.xml. In a test simulating xxx usecase on Amazon we use a lot placeholders in different profiles. In one particular profile we have 4 different placeholder files and this is how are they referenced in simplified blueprint.xml:

      <?xml version="1.0" encoding="UTF-8"?>
      <blueprint xmlns="http://www.osgi.org/xmlns/blueprint/v1.0.0"
      		xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      		xmlns:cm="http://aries.apache.org/blueprint/xmlns/blueprint-cm/v1.1.0"
      		xmlns:camel="http://camel.apache.org/schema/blueprint"
      		xsi:schemaLocation="http://www.osgi.org/xmlns/blueprint/v1.0.0 http://www.osgi.org/xmlns/blueprint/v1.0.0/blueprint.xsd
      		http://camel.apache.org/schema/blueprint http://camel.apache.org/schema/blueprint/camel-blueprint.xsd">
      
      	<cm:property-placeholder id="placeholder1" persistent-id="in.activemq" placeholder-prefix="$" placeholder-suffix="$">
      	</cm:property-placeholder>
      	<cm:property-placeholder id="placeholder2" persistent-id="in.topic" placeholder-prefix="$$" placeholder-suffix="$$">
      	</cm:property-placeholder>
      	<cm:property-placeholder id="placeholder3" persistent-id="out.activemq" placeholder-prefix="$$$" placeholder-suffix="$$$">
      	</cm:property-placeholder>
      	<cm:property-placeholder id="placeholder4" persistent-id="out.topic" placeholder-prefix="$$$$" placeholder-suffix="$$$$">
      	</cm:property-placeholder>
      	
      
      	<camelContext id="xlate-customer" xmlns="http://camel.apache.org/schema/blueprint" autoStartup="true">
      		<propertyPlaceholder location="blueprint:placeholder1,blueprint:placeholder2,blueprint:placeholder3,blueprint:placeholder4" id="properties1"/>
      		<route id="xlate1" >
      			<from uri="activemq-in:queue:test?username=admin&amp;password=admin"/>
      			<!--<bean ref="transform"/>-->
      			<to uri="activemq-out:topic:out?username=admin&amp;password=admin&amp;disableReplyTo=true"/>
      		</route>
      	</camelContext>
      
      	<!--Inbound broker-->
      	<bean id="activemq-in" class="org.apache.activemq.camel.component.ActiveMQComponent">
      		<property name="configuration" ref="amqConfig-in"/>
      	</bean>
      
      	<bean id="amqConfig-in" class="org.apache.camel.component.jms.JmsConfiguration">
      		<property name="connectionFactory" ref="pooledConnectionFactory-in"/>
      	</bean>
      
      	<bean id="pooledConnectionFactory-in"
      			class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">
      		<property name="connectionFactory" ref="amqConnectionFactory-in"/>
      	</bean>
      
      	<bean id="amqConnectionFactory-in" class="org.apache.activemq.ActiveMQConnectionFactory">
      		<property name="brokerURL" value="failover:(tcp://$activemq.host$:$activemq.port$)"/>
      		<property name="trustAllPackages" value="true"/>
      	</bean>
      
      	<!--Outbound broker-->
      	<bean id="activemq-out" class="org.apache.activemq.camel.component.ActiveMQComponent">
      		<property name="configuration" ref="amqConfig-out"/>
      	</bean>
      
      	<bean id="amqConfig-out" class="org.apache.camel.component.jms.JmsConfiguration">
      		<property name="connectionFactory" ref="pooledConnectionFactory-out"/>
      	</bean>
      
      	<bean id="pooledConnectionFactory-out"
      			class="org.apache.activemq.pool.PooledConnectionFactory" init-method="start" destroy-method="stop">
      		<property name="connectionFactory" ref="amqConnectionFactory-out"/>
      	</bean>
      
      	<bean id="amqConnectionFactory-out" class="org.apache.activemq.ActiveMQConnectionFactory">
      		<property name="brokerURL" value="failover:(tcp://$$$activemq.host$$$:$$$activemq.port$$$)"/>
      		<property name="trustAllPackages" value="true"/>
      	</bean>
      </blueprint>
      
      

      I am aware this is not really usual to have similar suffixes and postfixes in different placeholders but this worked without a problem in 6.3.0 187 GA build. If this blueprint is deployed on R1 build then bundle is unable to connect to amq broker because it has wrong address and in wrong format of the address:

      Failed to connect to [tcp://$$54.90.206.193$$:$$61618$$] after: 10 attempt(s) continuing to retry.
      

      Profile used looks like this:

      fabric:profile-create --parent feature-cxf --parent feature-camel --parent mq-client customer
      fabric:profile-edit -f camel-amq -f camel-jms -f activemq-camel -f camel-jackson customer
      fabric:profile-edit -b mvn:org.jboss.fuse.qa.fabric/xlate-customer/1.0 customer
      fabric:profile-edit --pid in.activemq/activemq.host=localhost --pid in.activemq/activemq.port=61618 customer
      fabric:profile-edit --pid in.activemq/activemq.host.2=localhost --pid in.activemq/activemq.port.2=61619 customer
      fabric:profile-edit --pid out.activemq/activemq.host=localhost --pid out.activemq/activemq.port=61620 customer
      fabric:profile-edit --pid out.activemq/activemq.host.2=localhost --pid out.activemq/activemq.port.2=61621 customer
      fabric:profile-edit --pid in.topic/in.queue.name.calcium=Consumer.A.VirtualTopic.Calcium --pid in.topic/in.queue.name.cholesterol=Consumer.A.VirtualTopic.Cholesterol  customer
      fabric:profile-edit --pid in.topic/in.queue.name.glucose=Consumer.A.VirtualTopic.Glucose --pid in.topic/in.queue.name.pressure=Consumer.A.VirtualTopic.Pressure  customer
      fabric:profile-edit --pid out.topic/out.topic.name=VirtualTopic.Customer customer
      fabric:profile-edit --pid out.topic/deliveries=5 --pid out.topic/delay=30000 customer
      

            rhn-support-tasato Tadayoshi Sato
            rjakubco Roman Jakubco (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated:
              Resolved: