user1493140
user1493140

Reputation: 6186

Mule 3.3.0 - global property not being resolved from properties file

The global property is not being resolved from properties file, as a result of which mmc deployment fails. Any ides why what could be wrong?

<context:property-placeholder location="airports.properties" />
<global-property name="airportslist" value="${airportslist}" />

Getting the following exception --

com.mulesoft.mmc.agent.v3.dto.DeploymentException: Unexpected exception parsing XML document from URL [file:/arprt/mule-esb-ee/mule-enterprise-standalone-3.3.0/apps/myapp-1.0.0-SNAPSHOT/myapp-config.xml]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'airportslist' (org.mule.api.lifecycle.InitialisationException) (org.mule.api.config.ConfigurationException)
        at com.mulesoft.mmc.agent.service.impl.ApplicationServiceImpl.deploy(ApplicationServiceImpl.java:245)
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)

airports.properties contains the above mentioned property:

  airportslist={'SFO', 'YYZ', 'DFW'}

Upvotes: 5

Views: 2173

Answers (1)

David Dossot
David Dossot

Reputation: 33413

You do not need to declare a global-property if the property is defined in a properties file and loaded with the context:property-placeholder.

Just remove:

<global-property name="airportslist" value="${airportslist}" />

and use ${airportslist} anywhere you need it in your config.

Upvotes: 4

Related Questions