This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
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


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
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: 393
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: 393
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: 1646
    
    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]
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: 2 different <context:property-placeholder: Could not resolve property placeholder
 
Similar Threads
Exception in thread "main" java.lang.NullPointerException (cannot connect to database)
Getting started with Spring Framework 3.1
Error in Spring 3 application
Spring 3
Steps to configure and use Mysql database with Spring MVC 3.0 without using hibernate.