0 Replies Latest reply on Dec 5, 2013 5:35 AM by Muthu Veerappan

    Camel Property Placeholder

    Muthu Veerappan Newbie

      Hi I'm new to JBOSS fuse. I would like to know about the camel placeholders

      My blueprint looks like this

       

      <?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: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">

       

        <camelContext id="rider-auto-file-poller" trace="true" xmlns="http://camel.apache.org/schema/blueprint">
          <propertyPlaceholder id="properties" location="com/myprop.properties"/>
          <route id="file-to-jms">
            <from uri="{{fileEndpoint}}" />
            <to uri="activemq:Message-TestQueue" />
          </route>
        </camelContext>


          <!-- Set username and password to values you set in etc/user.properties -->
          <bean id="activemq" class="org.apache.activemq.camel.component.ActiveMQComponent" >
              <property name="brokerURL" value="tcp://localhost:61616"/>
              <property name="userName" value="admin"/>
              <property name="password" value="admin"/>
          </bean>
      </blueprint>

       

      I have place the properties file in the mentioned location. But am getting an error saying

      Error occurred during starting Camel: CamelContex

      t(rider-auto-file-poller) due Failed to create route file-to-jms: Route[[From[{{

      fileEndpoint}}]] -> [To[activemq:Message-TestQ... because of Failed to resolve e

      ndpoint: {{fileEndpoint}} due to: PropertiesComponent with name properties must

      be defined in CamelContext to support property placeholders.

      org.apache.camel.FailedToCreateRouteException: Failed to create route file-to-jm

      s: Route[[From[{{fileEndpoint}}]] -> [To[activemq:Message-TestQ... because of Fa

      iled to resolve endpoint: {{fileEndpoint}} due to: PropertiesComponent with name

      properties must be defined in CamelContext to support property placeholders.

       

      I'm also getting a error saying properties not found in the location mentioned.

       

      Am looking for this properties placeholder option and I haven't suceeded. any of ur example files wil also be of great help.

      Thanks in Advance