PropertySourcesPropertyResolver.getProperty() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
Javadoc
Thrown to indicate that a method has been passed an illegal or inappropriate argument. @author unascribed @since JDK1.0
at org.springframework.util.PropertyPlaceholderHelper.parseStringValue
(source)
at org.springframework.util.PropertyPlaceholderHelper.replacePlaceholders
(source)
at org.springframework.core.env.AbstractPropertyResolver.doResolvePlaceholders
(source)
at org.springframework.core.env.AbstractPropertyResolver.resolveRequiredPlaceholders
(source)
at org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders
(source)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty
(source)
at org.springframework.core.env.PropertySourcesPropertyResolver.getProperty
(source)
6 frames hidden

Typical Exception Messages

  1. Failed to load ApplicationContext
  2. 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}"
  3. Could not resolve placeholder 'PWD/#$HOME/~' in string value "echo -ne "\033]0;${PWD/#$HOME/~}\007""
  4. Unexpected exception parsing XML document from URL [file:/E:/syswin/.metadata/.plugins/org.eclipse.wst.server.core/tmp10/wtpwebapps/qt-examine/WEB-INF/classes/applicationContext-mybatis.xml]; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'mvn.databaseBean' in string value "${mvn.databaseBean}"
  5. Error creating bean with name 'ESBRouter': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'POLARIS_SITE_ID' in string value "${POLARIS_SITE_ID}"
  6. Could not resolve placeholder 'spring.profiles.to.active' in string value "${spring.profiles.to.active}"
  7. 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}' }"
  8. Could not resolve placeholder 'HOSTNAME' in string value "/var/log/hotwire/feedback/${ENVIRONMENT:local}/${ENVIRONMENT_TYPE:permanent}/${IMAGE_TAG:latest}/${HOSTNAME}/${CONTAINER_NAME}"
  9. Could not resolve placeholder 'HOME' in value "${HOME}/leafer-sfl4j.log"
  10. Failed to process import candidates for configuration class [com.bpit.migrant.TransApplication]; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.autoconfigure.web.ErrorMvcAutoConfiguration$WhitelabelErrorViewConfiguration

Origin

AbstractPropertyResolver.resolveNestedPlaceholders() has thrown an IllegalArgumentException

java.lang.IllegalArgumentException
4 frames hidden
org.springframework.core.env.AbstractPropertyResolver.resolveNestedPlaceholders
13Web pages

Specific cases

External results for this pattern (12)

  1. Failed to process import candidates for configuration class [de.zalando.zally.Application]; nested exception is java.lang.IllegalStateException: Error processing condition on org.springframework.boot.actuate.autoconfigure.web.server.ManagementContextAutoConfiguration$DifferentManagementContextConfiguration
    Show stack trace
  2. vulncheckervia GitHub4 months ago
    Could not resolve placeholder 'pom.version' in string value "${pom.version}"
    Show stack trace
  3. default-errorvia GitHub5 months ago
    Error creating bean with name 'nitriteDataGate': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'DATAGATE_MONGO_USER' in value "${DATAGATE_MONGO_USER}"
    Show stack trace
  4. JessonYuevia GitHub8 months ago
    Error creating bean with name 'patchService': Injection of autowired dependencies failed; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder '盲陆聽莽職聞tomcat猫路炉氓戮聞' in string value "${盲陆聽莽職聞tomcat猫路炉氓戮聞}/webapps/patch-manager-static"
    Show stack trace
  5. Arefevia Stack Overflow10 months ago
    Unable to start embedded container; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'servletContainer' defined in com.quotecrunchers.email.HubSpotEmailApplication: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.boot.context.embedded.EmbeddedServletContainerFactory]: Factory method 'servletContainer' threw exception; nested exception is java.lang.IllegalArgumentException: Could not resolve placeholder 'BASE' in value "${BASE}"
    Show stack trace
  6. zkh26via GitHub1 year ago
    Could not resolve placeholder 'HOME' in value "${HOME}/leafer-sfl4j.log"
    Show stack trace
  7. jot-hubvia GitHub1 year ago
    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}' }"
    Show stack trace
  8. Could not resolve placeholder 'spring.profiles.to.active' in string value "${spring.profiles.to.active}"
    Show stack trace