Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-6062

Placeholder cannot be determined in camel property definition

    Details

    • Type: Improvement
    • Status: Resolved
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.10.3
    • Fix Version/s: 2.16.0
    • Component/s: camel-core
    • Labels:
      None
    • Estimated Complexity:
      Moderate

      Description

      Hello,

      I've got following camel context definition:

      <camelContext id="myContext" xmlns="http://camel.apache.org/schema/spring" trace="true">
              <camel:properties>
                      <property key="http.proxyScheme" value="{{http.proxyScheme}}"/>
                      <property key="http.proxyHost" value="{{http.proxyHost}}"/>
                      <property key="http.proxyPort" value="8080"/>
              </camel:properties>
      
              <propertyPlaceholder id="properties" location="classpath:net.atos.acdwb.core.cfg"/>
      
              <routeBuilder ref="wallboardRoute" />
      </camelContext>
      

      Here the placeholders as defined in net.atos.acdwb.core.cfg:

      # ...
      http.proxyScheme=http
      http.proxyHost=myHost
      # ...
      

      This file is available in the classpath as other spring placeholders are detected within the context file. Even so, I get following exception when attempting to run my unittest:

      (...)
      Caused by: java.lang.IllegalStateException: Scheme 'http.proxyscheme' not registered.
      at org.apache.http.conn.scheme.SchemeRegistry.getScheme(SchemeRegistry.java:71)
      at org.apache.http.impl.conn.DefaultClientConnectionOperator.openConnection(DefaultClientConnectionOperator.java:127)
      (...)

      According to Claus, placeholders are not supported on these Camel properties.

      I thing it would be very helpful, though.

      Thanks and regards,
      Myriam

        Attachments

          Activity

            People

            • Assignee:
              davsclaus Claus Ibsen
              Reporter:
              myriam.k Myriam Khairallah
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: