I am facing a strange issue with a spring project in netbeans.
I have a set of context xmls say –
jms/myjms-context.xml – which internally loads jms.properties using property-placeholder
similarly thrs a jdbc context xml –
jdbc/myjdbc-context.xml – which internally loads jdbc.properties using property-placeholder
And these contexts needs to be imported as resources in my app-context.xml.
now if i import just one of these the application loads but when i import both i get an error with the property reference – “Could not resolve placeholder…” – in the second imported context (be it jms-context or jdbc-context)!!
What is going wrong?
-I am using Spring 3.0 and Spring integration 2.1
If you have more than one
PropertyPlaceHolderConfigurerloaded into a spring context, as is your case, you need to set theignoreUnresolvablePlaceholdersto true so that the first one that will load, will ignore any placeholders that it can’t resolve.Hope this helps.