This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund 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
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Frameworks » Spring
Reply 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: 299
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: 299
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: 1282

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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
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
Steps to configure and use Mysql database with Spring MVC 3.0 without using hibernate.
Spring 3
Error in Spring 3 application