java.lang.IllegalArgumentException: Could not resolve placeholder 'foo.bar' in string value "${foo.bar}"

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 sherring
, 1 year ago
Could not resolve placeholder 'foo.bar' in string value "${foo.bar}"
via egovernments.org by Unknown author, 1 year ago
Could not resolve placeholder 'maven.build.timestamp' in string value "${maven.build.timestamp}"
via GitHub by timsporcic
, 2 years ago
Could not resolve placeholder 'PWD/#$HOME/~' in string value "echo -ne "\033]0;${PWD/#$HOME/~}\007""
via Stack Overflow by John Maclein
, 10 months ago
Could not resolve placeholder 'spring.profiles.to.active' in string value "${spring.profiles.to.active}"
via GitHub by zkh26
, 4 months ago
Could not resolve placeholder 'HOME' in value "${HOME}/leafer-sfl4j.log"
via Stack Overflow by VladislavLysov
, 1 year ago
Could not resolve placeholder 'foo' in string value "${foo}"
java.lang.IllegalArgumentException: Could not resolve placeholder 'foo.bar' in string value "${foo.bar}"
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.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)
at org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders(AbstractPropertyResolver.java:195)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:87)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:60)
at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:132)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)
at org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:70)
at org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:207)
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:153)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)
at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:808)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1027)
at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)

Users with the same issue

Samebug visitor profile picture
Unknown user
Once, 1 year ago
3 times, 11 months ago
Once, 1 week ago
5 times, 9 months ago
Once, 3 weeks ago
55 more bugmates

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