org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest'

Spring JIRA | David Easley | 6 years ago
  1. 0

    Can I use a property placeholder with Spring EL?

    Stack Overflow | 6 years ago | David Easley
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest'
  2. 0

    Can I use a property placeholder with Spring EL? - Stack Overflow

    xluat.com | 1 year ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest'
  3. 0

    Please see [http://stackoverflow.com/questions/3055554/can-i-use-a-property-placeholder-with-spring-el], particularly my comment to skaffman's answer. Long version: In Spring 2, if a property was not present in the properties file the setter on the bean was not called and so the default value hard-coded in Bean was used. This provided a convenient means for having 'unadvertised' properties which are usually not present in a product's properties file but can be added only if some default behaviour needs to be overridden. After upgrading to Spring 3, it seems the behaviour is different: If the property is not present in the properties file I get the following exception: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272) Trying #{${validateRequest}?:true} (after reading SPR-7209 and upgrading to Spring 3.0.3) only works if the property is blank. If the property is absent I get the same "Could not resolve placeholder 'validateRequest'" BeanDefinitionStoreException. It would be convenient if absent could be treated the same as blank/empty (which seems logical and reasonable).

    Spring JIRA | 6 years ago | David Easley
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Please see [http://stackoverflow.com/questions/3055554/can-i-use-a-property-placeholder-with-spring-el], particularly my comment to skaffman's answer. Long version: In Spring 2, if a property was not present in the properties file the setter on the bean was not called and so the default value hard-coded in Bean was used. This provided a convenient means for having 'unadvertised' properties which are usually not present in a product's properties file but can be added only if some default behaviour needs to be overridden. After upgrading to Spring 3, it seems the behaviour is different: If the property is not present in the properties file I get the following exception: SEVERE: Exception sending context initialized event to listener instance of class org.springframework.web.context.ContextLoaderListener org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272) Trying #{${validateRequest}?:true} (after reading SPR-7209 and upgrading to Spring 3.0.3) only works if the property is blank. If the property is absent I get the same "Could not resolve placeholder 'validateRequest'" BeanDefinitionStoreException. It would be convenient if absent could be treated the same as blank/empty (which seems logical and reasonable).

    Spring JIRA | 6 years ago | David Easley
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest'
  6. 0

    [SPR-7294] Placeholder property: absent should be treated same as blank/empty - Spring JIRA

    spring.io | 1 year ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'annotationMapping' defined in class path resource : Could not resolve placeholder 'validateRequest'

    15 unregistered visitors
    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. org.springframework.beans.factory.BeanDefinitionStoreException

      Invalid bean definition with name 'annotationMapping' defined in class path resource [com/northgateis/pole/ws/applicationContext-ws.xml]: Could not resolve placeholder 'validateRequest'

      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties()
    2. Spring Beans
      PropertyResourceConfigurer.postProcessBeanFactory
      1. org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272)
      2. org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
      2 frames
    3. Spring Context
      AbstractApplicationContext.refresh
      1. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:640)
      2. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:615)
      3. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:405)
      3 frames
    4. Spring
      ContextLoader.createWebApplicationContext
      1. org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:272)
      1 frame