org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [spring/spring-database.xml]: Could not resolve placeholder 'webroot' in string value "jdbc:hsqldb:file:${webroot}/WEB-INF/classes/DBStorage/testdb"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'webroot' in string value "jdbc:hsqldb:file:${webroot}/WEB-INF/classes/DBStorage/testdb"

Searched on Google with the first line of a JAVA stack trace?

We can recommend more relevant solutions and speed up debugging when you paste your entire stack trace with the exception message. Try a sample exception.

Recommended solutions based on your search

Samebug tips

,
Expert tip

Check if you don't have more than one instance of PropertySourcesPlaceholderConfigurer in your code, this might cause conflict.

Solutions on the web

via Stack Overflow by IngeniousTom
, 1 year ago
Invalid bean definition with name 'dataSource' defined in class path resource [spring/spring-database.xml]: Could not resolve placeholder 'webroot' in string value "jdbc:hsqldb:file:${webroot}/WEB-INF/classes/DBStorage/testdb"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'webroot' in string value "jdbc:hsqldb:file:${webroot}/WEB-INF/classes/DBStorage/testdb"
via com.br by Unknown author, 11 months ago
Invalid bean definition with name 'itemReader' defined in class path resource [etlapp-context.xml]: Could not resolve placeholder 'csv.location' in string value "file:${csv.location}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'csv.location' in string value "file:${csv.location}"
via Stack Overflow by user1961493
, 11 months ago
Invalid bean definition with name 'org.springframework.integration.file.config.FileListFilterFactoryBean#0' defined in null: Could not resolve placeholder 'filename.pattern' in string value "${filename.pattern}"; nested exception is
via GitHub by laiynus
, 10 months ago
Invalid bean definition with name 'hikariConfig' defined in class path resource [sample-application-context.xml]: Could not resolve placeholder 'user.password' in string value "${user.password}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'user.password' in string value "${user.password}"
via ptc.com by Unknown author, 1 year ago
Invalid bean definition with name 'com.coldlight.ccc.vfs.aws.PrestoS3NeuronFileSystem#0' defined in class path resource [spring/applicationContext.xml]: Could not resolve placeholder 'dataconnect.aws.accessKey' in string value
via Stack Overflow by Unknown author, 2 years ago
Invalid bean definition with name 'org.springframework.security.web.access.intercept.FilterSecurityInterceptor#0' defined in null: Could not resolve placeholder 'main.page' in string value "/${main.page}"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'main.page' in string value "/${main.page}"
org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'dataSource' defined in class path resource [spring/spring-database.xml]: Could not resolve placeholder 'webroot' in string value "jdbc:hsqldb:file:${webroot}/WEB-INF/classes/DBStorage/testdb"; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'webroot' in string value "jdbc:hsqldb:file:${webroot}/WEB-INF/classes/DBStorage/testdb"
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveStringValue(BeanDefinitionVisitor.java:282)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.resolveValue(BeanDefinitionVisitor.java:204)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitPropertyValues(BeanDefinitionVisitor.java:141)
at org.springframework.beans.factory.config.BeanDefinitionVisitor.visitBeanDefinition(BeanDefinitionVisitor.java:82)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.processProperties(PropertySourcesPlaceholderConfigurer.java:177)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer.postProcessBeanFactory(PropertySourcesPlaceholderConfigurer.java:152)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:284)
at org.springframework.context.support.PostProcessorRegistrationDelegate.invokeBeanFactoryPostProcessors(PostProcessorRegistrationDelegate.java:166)
at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:678)
at org.springframework.boot.context.embedded.EmbeddedWebApplicationContext.refresh(EmbeddedWebApplicationContext.java:118)
at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:760)
at org.springframework.boot.SpringApplication.createAndRefreshContext(SpringApplication.java:360)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:306)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1185)
at org.springframework.boot.SpringApplication.run(SpringApplication.java:1174)
at com.dvdexchange.DvdExchangeSpringBootApplication.main(DvdExchangeSpringBootApplication.java:18)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)

Users with the same issue

2 times, 1 year ago
2 times, 1 month ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 1 year ago
Samebug visitor profile picture
Unknown user
Once, 2 years ago

Write tip

Know the solutions? Share your knowledge to help other developers to debug faster.