Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Mule 3.3.0 - global property not being resolved from properties file

Tags:

mule

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'}
like image 574
user1493140 Avatar asked Oct 05 '22 02:10

user1493140


1 Answers

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.

like image 124
David Dossot Avatar answered Oct 11 '22 18:10

David Dossot