0

My code, which is working earlier is not working suddenly and I am getting below error.

Could not resolve placeholder 'TABLE_DETAILS_CONCURRENT_CONSUMERS'
        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:624)
        at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:599)
        at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:398)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:139)
        at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:93)

Note: This question is not duplicate to existing questions in stackoverflow since I have tried all suggestions

Could not resolve Spring property placeholder

Spring Could not Resolve placeholder

Could not resolve placeholder in string value

spring PropertyPlaceholderConfigurer and context:property-placeholder

I have

  1. One instance of

    org.springframework.beans.factory.config.PropertyPlaceholderConfigurer

  2. ignore-unresolved-placeholders is set to true

but still I am getting same error.

XML:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:p="http://www.springframework.org/schema/p"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
        http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
        http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util.xsd">

     <context:property-placeholder location="file:/home/pg/myapp/conf/pds_config.properties" ignore-resource-not-found="true"/>
     <bean class="com.baseapp.pds.PDSInitializer" factory-method="createConfiguration">
        <constructor-arg value="/home/pg/myapp/conf/pds_config.properties"></constructor-arg>
     </bean>
     <bean class="com.baseapp.pds.sc.SC" init-method="init"/>
     <bean class="com.baseapp.pds.PDSInitializer" factory-method="initDomain">
     </bean>


</beans>

XML2:

<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:beans="http://www.springframework.org/schema/beans"
    xmlns:si="http://www.springframework.org/schema/integration" 
    xmlns:si-jms="http://www.springframework.org/schema/integration/jms" 
    xmlns:context="http://www.springframework.org/schema/context"
    xmlns:stream="http://www.springframework.org/schema/integration/stream"
    xmlns:aop="http://www.springframework.org/schema/aop"
    xmlns:util="http://www.springframework.org/schema/util"
    xsi:schemaLocation="http://www.springframework.org/schema/beans
            http://www.springframework.org/schema/beans/spring-beans.xsd
            http://www.springframework.org/schema/context
            http://www.springframework.org/schema/context/spring-context.xsd
            http://www.springframework.org/schema/integration
            http://www.springframework.org/schema/integration/spring-integration.xsd
            http://www.springframework.org/schema/integration/jms
            http://www.springframework.org/schema/integration/jms/spring-integration-jms.xsd
            http://www.springframework.org/schema/aop
            http://www.springframework.org/schema/aop/spring-aop.xsd
            http://www.springframework.org/schema/util 
            http://www.springframework.org/schema/util/spring-util.xsd">
    <context:property-placeholder location="file:/home/pg/baseapp/conf/pgconfig-serviceregistry.properties" ignore-resource-not-found="true" />

Spring version : 3.0.0

Ravindra babu
  • 37,698
  • 11
  • 250
  • 211

0 Answers0