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

Stack Overflow | sherring | 6 months ago
tip
Your exception is missing from the Samebug knowledge base.
Here are the best solutions we found on the Internet.
Click on the to mark the helpful solution and get rewards for you help.
  1. 0

    using spring.application.json for application.properties file in spring boot

    Stack Overflow | 6 months ago | sherring
    java.lang.IllegalArgumentException: Could not resolve placeholder 'foo.bar' in string value "${foo.bar}"
  2. 0

    GitHub comment 147#281988349

    GitHub | 1 month ago | jot-hub
    org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'myController' defined in file [C:\myProject\myApp\target\classes\com\myCompany\myTeam\myComponent\controller\myController.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'myCompObjectService': Unsatisfied dependency expressed through field 'myHelper'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'myHelper': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'stubrunner.runningstubs.myDependency-contracts.port' in string value "{'get_myDependency':'http://localhost:${stubrunner.runningstubs.myDependency-contracts.port}/myDependency/s2s/v1/v1/myDependencys/{myDependencyId}', 'post_myDependency': 'http://localhost:${stubrunner.runningstubs.myDependency-contracts.port}/myDependency/s2s/v1/v1/myDependencys', 'delete_myDependency':'http://localhost:${stubrunner.runningstubs.myDependency-contracts.port}/myDependency/s2s/v1/v1/myDependencys/{myDependencyId}' }"
  3. 0

    Configure bean in Spring-Boot

    Stack Overflow | 3 years ago | Fabricio Lemos
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'application': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire method: public void com.app.Application.setSoftwareVersion(java.lang.String); nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'project.version' in string value "${project.version}"
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Could not resolve placeholder 'pom.version' in string value "${pom.version}"

    GitHub | 12 months ago | tinoloni
    java.lang.IllegalArgumentException: Could not resolve placeholder 'pom.version' in string value "${pom.version}"
  6. 0

    Spring @PropertySource and Environment Type Conversions

    Stack Overflow | 3 years ago | Forge_7
    java.lang.IllegalArgumentException: Cannot convert value [classpath:configFile.xml] from source type [String] to target type [Resource]
Not finding the right solution?
Take a tour to get the most out of Samebug.

Tired of useless tips?

Automated exception search integrated into your IDE

Root Cause Analysis

  1. java.lang.IllegalArgumentException

    Could not resolve placeholder 'foo.bar' in string value "${foo.bar}"

    at org.springframework.util.PropertyPlaceholderHelper.parseStringValue()
  2. Spring Core
    AbstractEnvironment.getProperty
    1. org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:174)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4. org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    5. org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders(AbstractPropertyResolver.java:195)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    6. org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:87)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    7. org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:60)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    8. org.springframework.core.env.AbstractEnvironment.getProperty(AbstractEnvironment.java:531)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    8 frames
  3. Spring Context
    PropertySourcesPlaceholderConfigurer$1.getProperty
    1. org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:132)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.context.support.PropertySourcesPlaceholderConfigurer$1.getProperty(PropertySourcesPlaceholderConfigurer.java:129)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2 frames
  4. Spring Core
    AbstractPropertyResolver.resolveRequiredPlaceholders
    1. org.springframework.core.env.PropertySourcesPropertyResolver.getProperty(PropertySourcesPropertyResolver.java:84)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.core.env.PropertySourcesPropertyResolver.getPropertyAsRawString(PropertySourcesPropertyResolver.java:70)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.core.env.AbstractPropertyResolver$1.resolvePlaceholder(AbstractPropertyResolver.java:207)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4. org.springframework.util.PropertyPlaceholderHelper.parseStringValue(PropertyPlaceholderHelper.java:153)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    5. org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders(PropertyPlaceholderHelper.java:126)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    6. org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders(AbstractPropertyResolver.java:204)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    7. org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders(AbstractPropertyResolver.java:178)[spring-core-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    7 frames
  5. Spring Context
    PropertySourcesPlaceholderConfigurer$2.resolveStringValue
    1. org.springframework.context.support.PropertySourcesPlaceholderConfigurer$2.resolveStringValue(PropertySourcesPlaceholderConfigurer.java:172)[spring-context-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    1 frame
  6. Spring Beans
    AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject
    1. org.springframework.beans.factory.support.AbstractBeanFactory.resolveEmbeddedValue(AbstractBeanFactory.java:808)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    2. org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1027)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    3. org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1014)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4. org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:545)[spring-beans-4.2.3.RELEASE.jar:4.2.3.RELEASE]
    4 frames