org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'serviceProperties' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Could not resolve placeholder 'webapp.server'

Spring JIRA | David Mobley | 6 years 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

    given securityContext.xml file with the following (abbreviated) contents: <beans xmlns=... xsi:schemaLocation=... xmlns:xsi=...> <bean id="props" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property value="true" name="ignoreUnresolvablePlaceholders"/> <property value="true" name="ignoreResourceNotFound"/> <property name="properties"> <props> <prop key="webapp.port">8443</prop> <prop key="webapp.server">localhost</prop> </props> </property> <property name="locations"> <list> <value>classpath:all-dev.properties</value> <value>classpath:all-dev-pub.properties</value> <value>classpath:all-global.properties</value> </list> </property> </bean> ... <bean id="serviceProperties" class="org.springframework.security.ui.cas.ServiceProperties"> <property value="https://${webapp.server}:${webapp.port}/core-services/j_spring_cas_security_check" name="service"/> <property value="false" name="sendRenew"/> </bean> as you can see I tell PropertyPlaceholderConfigurer to ignoreUnresolvablePlaceholders, and have defaults, and various locations (all of which valid, with "all-global.properties" containing overrides to the default values.) at Tomcat runtime i get the following.... ERROR main org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'serviceProperties' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Could not resolve placeholder 'webapp.server' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272) why can't PropertyPlaceholderConfigurer resolve this variable? it's got a default and even if it didn't shouldn't it ignore it? from the Javadoc (and other google'd sources) this should work. i'm at a loss as to why it cannot find "webapp.server". thanks in advance for your assistance. NOTE: this is my first ever use of Jira. I normally would not categorize this as a bug (i assume it's User Error!), but am unsure as to what category to specify. please forgive my ignorance. dhm

    Spring JIRA | 6 years ago | David Mobley
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'serviceProperties' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Could not resolve placeholder 'webapp.server'
  2. 0

    given securityContext.xml file with the following (abbreviated) contents: <beans xmlns=... xsi:schemaLocation=... xmlns:xsi=...> <bean id="props" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property value="true" name="ignoreUnresolvablePlaceholders"/> <property value="true" name="ignoreResourceNotFound"/> <property name="properties"> <props> <prop key="webapp.port">8443</prop> <prop key="webapp.server">localhost</prop> </props> </property> <property name="locations"> <list> <value>classpath:all-dev.properties</value> <value>classpath:all-dev-pub.properties</value> <value>classpath:all-global.properties</value> </list> </property> </bean> ... <bean id="serviceProperties" class="org.springframework.security.ui.cas.ServiceProperties"> <property value="https://${webapp.server}:${webapp.port}/core-services/j_spring_cas_security_check" name="service"/> <property value="false" name="sendRenew"/> </bean> as you can see I tell PropertyPlaceholderConfigurer to ignoreUnresolvablePlaceholders, and have defaults, and various locations (all of which valid, with "all-global.properties" containing overrides to the default values.) at Tomcat runtime i get the following.... ERROR main org.springframework.web.context.ContextLoader - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'serviceProperties' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Could not resolve placeholder 'webapp.server' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272) why can't PropertyPlaceholderConfigurer resolve this variable? it's got a default and even if it didn't shouldn't it ignore it? from the Javadoc (and other google'd sources) this should work. i'm at a loss as to why it cannot find "webapp.server". thanks in advance for your assistance. NOTE: this is my first ever use of Jira. I normally would not categorize this as a bug (i assume it's User Error!), but am unsure as to what category to specify. please forgive my ignorance. dhm

    Spring JIRA | 6 years ago | David Mobley
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'serviceProperties' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Could not resolve placeholder 'webapp.server'
  3. 0

    Struts 2 Hibernate 3 Integration Example with Spring 3 | DOJ Software Consultant | Dinesh on Java

    dineshonjava.com | 11 months ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'hibernate.hbm2ddl.create'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Struts 2 Hibernate 3 Integration Example with Spring 3 | DOJ Software Consultant | Dinesh on Java

    dineshonjava.com | 2 years ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'sessionFactory' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'hibernate.hbm2ddl.create'
  6. 0

    java-jasig-cas-user - RE: problems with wiki entry JpaTicketRegistry - msg#00214 - Recent Discussion OSDir.com

    osdir.com | 1 year ago
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'cleanerLock' defined in ServletContext resource [/WEB-INF/spring-configuration/ticketRegistry.xml]: Could not resolve placeholder 'ticket.cleaner.database.platform'

    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 'serviceProperties' defined in ServletContext resource [/WEB-INF/securityContext.xml]: Could not resolve placeholder 'webapp.server'

      at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties()
    2. Spring Beans
      PropertyPlaceholderConfigurer.processProperties
      1. org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:272)
      1 frame