Monday, February 1, 2010

Spring unresolved placeholder problem

Got an exception while bootstrapping a Spring-enabled web app - 

org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'securityService' defined in class path resource [securitySpring.xml]: Could not resolve placeholder 'security.sanitization.wrapper.enabled' ....


The issue happens to be a named property "${security.sanitization.wrapper.enabled}" in securitySpring.xml is not being defined in any of the external property file that are loaded onto the classpath. After putting security.sanitization.wrapper.enabled=true in one of the main property files that web app can see, the problem gets resolved.

No comments: