java.lang.IllegalArgumentException

If you like a tip written by other Samebug users, mark is as helpful! Marks help our algorithm provide you better solutions and also help other users.
tip

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


rafaelrafael

You have a different solution? A short tip here would help you and many other users who saw this issue last week.

  • GitHub comment 147#281988349
    via GitHub by jot-hub
    ,
  • Configure bean in Spring-Boot
    via Stack Overflow by Fabricio Lemos
    ,
    • java.lang.IllegalArgumentException: Could not resolve placeholder 'foo.bar' in string value "${foo.bar}" at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders(AbstractPropertyResolver.java:195)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:87)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:60)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:531)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:132)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:129)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:70)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:207)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:153)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:808)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1027)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE] at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]

    Users with the same issue

    kjhdofjosvskjhdofjosvs
    3 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    Nikolay RybakNikolay Rybak
    3 times, last one,
    Unknown visitor
    Unknown visitor1 times, last one,
    batwalrus76batwalrus76
    1 times, last one,
    45 more bugmates