Two PropertyPlaceholderConfigurer defined in two conext files not loaded properly
My application context has several context.xml .
context.xml
contextTwo.xml
Each context file has bean definations and a PPC defined to replace some properties from seperate properties files
context.xml
Code:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:default.properties</value>
</list>
</property>
</bean>
<bean id="initBean" class="com.xyz.init.Init" init-method="init">
<property name="message" value="${message}"></property>
<property name="service" ref="myService"></property>
</bean>
contextTwo.xml
Code:
<bean class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>classpath:defaultTwo.properties</value>
</list>
</property>
</bean>
<bean id="initTwoBean" class="com.xyz.init.InitTwo" init-method="init">
<property name="message" value="${messageTwo}"></property>
<property name="service" ref="myService"></property>
</bean>
On bundle deployment it is giving
[ERROR]
rce.kernel.deployer.core.DeploymentException: Invalid bean definition with name 'initTwoBean' defined in URL [bundleentry://62.fwk19194
373/META-INF/spring/module-contextTwo.xml]: Could not resolve placeholder 'messageTwo'
[/ERROR]