Property-Placeholder not failing when properties file not present
Hi, I've run into somewhat of an odd issue, although someone else might be able to explain it. Essentially, I have 3 application context XML files:
A.xml
Code:
<import resource="B.xml" />
<import resource="C.xml" />
B.xml
Code:
Does some imports...
Defines some beans...
C.xml
Code:
<context:property-placeholder location="classpath:nonexistent-file.properties" />
<bean id="context" class="org.somepackage.SomeClass" init-method="initialize" scope="singleton">
<constructor-arg value="${someprop.propname}"/>
</bean>
If I start the A.xml context, I receive an error that says "Could not resolve placeholder..." for the bean with id "context". This is somewhat suprising since the properties file doesn't exist so I would assume it should never make it this far. If I then comment out the import of B.xml, and start A.xml again, I then get an exception because the properties file is not found, which seems like the correct behavior.
Does anyone have any ideas why this might happen?
Thanks