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

Stack Overflow | sherring | 8 months ago
tip
Click on the to mark the solution that helps you, Samebug will learn from it.
As a community member, you’ll be rewarded for you help.
  1. 0

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

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

    GitHub comment 147#281988349

    GitHub | 3 months 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

    Error when starting JavaFXApplication from eclipse

    GitHub | 3 months ago | madoar
    org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.phoenicis.javafx.controller.ControllerConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private org.phoenicis.javafx.views.ViewsConfiguration org.phoenicis.javafx.controller.ControllerConfiguration.viewsConfiguration; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.phoenicis.javafx.views.ViewsConfiguration': Injection of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: private java.lang.String org.phoenicis.javafx.views.ViewsConfiguration.applicationGitRevision; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'buildNumber' in string value "${buildNumber}" Exception in Application start method java.lang.reflect.InvocationTargetException
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 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}"
  6. 0

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

    GitHub | 1 year ago | tinoloni
    java.lang.IllegalArgumentException: Could not resolve placeholder 'pom.version' in string value "${pom.version}"
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