Why deploying a new feature config files are not installed before bundles are started ?

Solution Unverified - Updated -

Issue

  • The "feature.xml" file is like following which is using the "configFile" attribute:
<?xml version="1.0" encoding="UTF-8"?>
<features xmlns="http://karaf.apache.org/xmlns/features/v1.0.0">\
        <feature name="test-config" version="1.0.0" resolver="(obr)">
                <configfile finalname="/etc/test_properties.cfg">mvn:test/config-test/1.0.0-SNAPSHOT/cfg</configfile>
                <bundle>mvn:test/config-test/1.0.0-SNAPSHOT</bundle>
        </feature>
</features>
  • Where the bundle is a very simple route that picks up a value from the configuration file:
<cm:property-placeholder persistent-id="test_properties" />
        <bean id="exception" class="java.lang.Exception">
                <argument value="${text}" />
        </bean>
        <camelContext xmlns="http://camel.apache.org/schema/blueprint">
        <route>
            <from uri="timer:blah" />
            <throwException ref="exception" />
        </route>
    </camelContext>
  • When User start this bundle, the file gets created ok, however, the bundle is already started and has not read it:
16:51:18,061 | ERROR | 4 - timer://blah | DefaultErrorHandler              | 147 - org.apache.camel.camel-core - 2.10.0.fuse-71-047 | Failed delivery for (MessageId: ID-wildflower-59341-1361567870710-8-167 on ExchangeId: ID-wildflower-59341-1361567870710-8-168). Exhausted after delivery attempt: 1 caught: java.lang.Exception: ${text}
java.lang.Exception: ${text}

Environment

  • JBoss Fuse
    • 6.0

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content