wood burning stoves 2.0*
The moose likes Spring and the fly likes 2 different <context:property-placeholder: Could not resolve property placeholder Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Frameworks » Spring
Bookmark "2 different <context:property-placeholder: Could not resolve property placeholder" Watch "2 different <context:property-placeholder: Could not resolve property placeholder" New topic
Author

2 different <context:property-placeholder: Could not resolve property placeholder

H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 417
    
    4
Loaded via web:





Exception:



Why exception for : <property name="url" value="${url}"/> from applicationContext-jpa.xml

H Paul
Ranch Hand

Joined: Jul 26, 2011
Posts: 417
    
    4
0. To debug:


1. only loaded classpath:concepts/dao/jpa/accessdb.properties

INFO : org.springframework.context.support.PropertySourcesPlaceholderConfigurer - Loading properties file from class path resource [concepts/dao/jpa/accessdb.properties]


2. why exception because classpath:concepts/dao/jpa/hsqldb.properties
was not loaded. So 'url' could not be resolved.



3. 1 possible solution:


4. The best is yet to come. (propose a better one if have.)
Bill Gorder
Bartender

Joined: Mar 07, 2010
Posts: 1648
    
    7

for you scenario you only need one, there is nothing wrong with loading multiple propery files using one configurer. If you really needed multiples you should use the 'order' property.


[How To Ask Questions][Read before you PM me]
 
 
subject: 2 different <context:property-placeholder: Could not resolve property placeholder