Mule 3.3.0 - 未从属性文件中解析全局属性

时间:2013-02-08 22:28:59

标签: mule

未从属性文件解析全局属性,因此mmc部署失败。任何想法为什么可能出错?

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

获得以下异常 -

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包含上述属性:

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

1 个答案:

答案 0 :(得分:4)

如果属性在属性文件中定义并加载了global-property,则无需声明context:property-placeholder

只需删除:

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

并在配置中的任何位置使用${airportslist}