Spring Framework
  1. Spring Framework
  2. SPR-5719

only the first PropertyPlaceHolderConfigurer is initialized. Others are not

    Details

    • Type: Bug Bug
    • Status: Resolved
    • Priority: Major Major
    • Resolution: Duplicate
    • Affects Version/s: 2.5.6
    • Fix Version/s: None
    • Component/s: Core
    • Labels:
      None
    • Last commented by a User:
      false

      Description

      In my webapp I have multiple PPC configured in different context files. The primary context file is initialized through ContextLoaderListener and others are imported into the primary context xml file.

      In the primary context file, I have a PPC, which is initializing. Then there are other PPC in context files that are in jars which are initialized through imports. The PPC in those context files are not being initialized. If I remove the PPC from the primary context file, then one of the other PPC is being initialized. From my meddling around the code, it seems like only one PPC would be initialized per Application context, with or without imported context xml files.

      Currently I am including all the files though the PPC in my primary context file.

      I am wondering if this is a bug or is this how it is supposed to work?

        Issue Links

          Activity

          Hide
          Juergen Hoeller added a comment -

          How exactly are you configuring your PropertyPlaceholderConfigurers? Are you using the same id possibly, leading to later bean definitions overriding previously registered ones?

          Juergen

          Show
          Juergen Hoeller added a comment - How exactly are you configuring your PropertyPlaceholderConfigurers? Are you using the same id possibly, leading to later bean definitions overriding previously registered ones? Juergen
          Hide
          Gowrishankar V added a comment -

          Here are my configurations

          PPC - 1 (context xml is inside a jar)
          <bean id="databasePropertiesConfig" name="databasePropertiesConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
          <property name="location" value="classpath:database.properties" />
          </bean>

          PPC - 2 (in webapp context)
          <bean id="bbPropertiesConfig" name="bbPropertiesConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
          <property name="location" value="classpath:bb.properties" />
          </bean>

          Here is the error msg -

          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating shared instance of singleton bean 'bbPropertiesConfig'>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'bbPropertiesConfig'>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Eagerly caching bean 'bbPropertiesConfig' to allow for resolving potential circular references>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Getting BeanInfo for class [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Caching PropertyDescriptors for class [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'beanFactory' of type [org.springframework.beans.factory.BeanFactory]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'beanName' of type [java.lang.String]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'class' of type [java.lang.Class]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'fileEncoding' of type [java.lang.String]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'ignoreResourceNotFound' of type [boolean]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'ignoreUnresolvablePlaceholders' of type [boolean]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'localOverride' of type [boolean]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'location' of type [org.springframework.core.io.Resource]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'locations' of type [[Lorg.springframework.core.io.Resource;]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'nullValue' of type [java.lang.String]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'order' of type [int]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'placeholderPrefix' of type [java.lang.String]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'placeholderSuffix' of type [java.lang.String]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'properties' of type [java.util.Properties]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'propertiesArray' of type [[Ljava.util.Properties;]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'propertiesPersister' of type [org.springframework.util.PropertiesPersister]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'searchSystemEnvironment' of type [boolean]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'systemPropertiesMode' of type [int]>
          DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'systemPropertiesModeName' of type [java.lang.String]>
          DEBUG [org.springframework.beans.TypeConverterDelegate] - <Converting String to [interface org.springframework.core.io.Resource] using property editor [org.springframework.core.io.ResourceEditor@5ce067]>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'bbPropertiesConfig'>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating shared instance of singleton bean 'databasePropertiesConfig'>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'databasePropertiesConfig'>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Eagerly caching bean 'databasePropertiesConfig' to allow for resolving potential circular references>
          DEBUG [org.springframework.beans.TypeConverterDelegate] - <Converting String to [interface org.springframework.core.io.Resource] using property editor [org.springframework.core.io.ResourceEditor@10ff352]>
          DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'databasePropertiesConfig'>
          INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [bb.properties]>
          DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.b2b.url'>
          DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.b2c.url'>
          DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.subscriber.id'>
          DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.topcommunity.id'>
          DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'facebook.api.key'>
          INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@c406e0: defining beans [articleDisplayServiceImpl,helloWorldViewPreparer,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,integrationProperties,bbPropertiesConfig,albumDao,albumPerformanceDao,performerDao,trackDao,trackPerformanceCacheDao,trackPerformanceDao,annotatedService,annotatedServiceHelper,albumService,albumOrderManager,albumTitleComparator,performerService,trackDateComparator,trackOrderManager,trackService,albumController,recentChartController,yearEndChartController,performerController,tourSearchDetailController,tourSearchFormController,trackController,userController,albumWebServiceController,artistWebServiceController,chartFormatWebServiceController,trackWebServiceController,configuredService,configuredServiceHelper,chartDataSource,amgDataSource,chartCacheDao,chartDao,chartFormatDao,tourFinderDao,bbcomCacheAdministrator,chartService,chartFormatService,chartOrderManager,positionComparator,timeOnComparator,gainerComparator,dropComparator,tourFinderService,databasePropertiesConfig,userDataSource,sessionFactory,hibernateTemplate,abstractDao,userDao,articleCache,cmsCacheAdministrator]; root of factory hierarchy>
          ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed>
          org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'sessionFactory' defined in URL [zip:C:/bea10/user_projects/domains/DEV_BB/servers/DEV_BB_ADMIN/tmp/_WL_user/bbEAR/q8qo1b/APP-INF/lib/bbsvc-0.0.1-SNAPSHOT.jar!/hibernate-db-context.xml]: Could not resolve placeholder 'hibernate.dialect'
          at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:268)
          at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75)
          at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:553)
          at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:527)
          at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362)
          at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255)
          at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199)
          at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45)
          at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(Unknown Source)
          at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175)
          at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784)
          at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999)
          at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371)
          at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468)
          at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
          at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
          at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200)
          at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117)
          at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
          at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60)
          at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27)
          at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635)
          at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37)
          at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212)
          at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16)
          at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162)
          at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79)
          at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569)
          at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140)
          at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106)
          at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323)
          at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820)
          at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227)
          at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436)
          at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163)
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181)
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12)
          at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67)
          at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:173)

          I have used spring 1.8 and 2.0 before in other projects and have used PPC in multiple files without any issues. So, I am confused now..

          Let me know if you see something is wrong in my end.

          Show
          Gowrishankar V added a comment - Here are my configurations PPC - 1 (context xml is inside a jar) <bean id="databasePropertiesConfig" name="databasePropertiesConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:database.properties" /> </bean> PPC - 2 (in webapp context) <bean id="bbPropertiesConfig" name="bbPropertiesConfig" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer"> <property name="location" value="classpath:bb.properties" /> </bean> Here is the error msg - DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating shared instance of singleton bean 'bbPropertiesConfig'> DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'bbPropertiesConfig'> DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Eagerly caching bean 'bbPropertiesConfig' to allow for resolving potential circular references> DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Getting BeanInfo for class [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Caching PropertyDescriptors for class [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'beanFactory' of type [org.springframework.beans.factory.BeanFactory] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'beanName' of type [java.lang.String] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'class' of type [java.lang.Class] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'fileEncoding' of type [java.lang.String] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'ignoreResourceNotFound' of type [boolean] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'ignoreUnresolvablePlaceholders' of type [boolean] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'localOverride' of type [boolean] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'location' of type [org.springframework.core.io.Resource] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'locations' of type [ [Lorg.springframework.core.io.Resource;] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'nullValue' of type [java.lang.String] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'order' of type [int] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'placeholderPrefix' of type [java.lang.String] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'placeholderSuffix' of type [java.lang.String] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'properties' of type [java.util.Properties] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'propertiesArray' of type [ [Ljava.util.Properties;] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'propertiesPersister' of type [org.springframework.util.PropertiesPersister] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'searchSystemEnvironment' of type [boolean] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'systemPropertiesMode' of type [int] > DEBUG [org.springframework.beans.CachedIntrospectionResults] - <Found bean property 'systemPropertiesModeName' of type [java.lang.String] > DEBUG [org.springframework.beans.TypeConverterDelegate] - <Converting String to [interface org.springframework.core.io.Resource] using property editor [org.springframework.core.io.ResourceEditor@5ce067] > DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'bbPropertiesConfig'> DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating shared instance of singleton bean 'databasePropertiesConfig'> DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Creating instance of bean 'databasePropertiesConfig'> DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Eagerly caching bean 'databasePropertiesConfig' to allow for resolving potential circular references> DEBUG [org.springframework.beans.TypeConverterDelegate] - <Converting String to [interface org.springframework.core.io.Resource] using property editor [org.springframework.core.io.ResourceEditor@10ff352] > DEBUG [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Finished creating instance of bean 'databasePropertiesConfig'> INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [bb.properties] > DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.b2b.url'> DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.b2c.url'> DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.subscriber.id'> DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'cf.topcommunity.id'> DEBUG [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Resolved placeholder 'facebook.api.key'> INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Destroying singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@c406e0: defining beans [articleDisplayServiceImpl,helloWorldViewPreparer,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,integrationProperties,bbPropertiesConfig,albumDao,albumPerformanceDao,performerDao,trackDao,trackPerformanceCacheDao,trackPerformanceDao,annotatedService,annotatedServiceHelper,albumService,albumOrderManager,albumTitleComparator,performerService,trackDateComparator,trackOrderManager,trackService,albumController,recentChartController,yearEndChartController,performerController,tourSearchDetailController,tourSearchFormController,trackController,userController,albumWebServiceController,artistWebServiceController,chartFormatWebServiceController,trackWebServiceController,configuredService,configuredServiceHelper,chartDataSource,amgDataSource,chartCacheDao,chartDao,chartFormatDao,tourFinderDao,bbcomCacheAdministrator,chartService,chartFormatService,chartOrderManager,positionComparator,timeOnComparator,gainerComparator,dropComparator,tourFinderService,databasePropertiesConfig,userDataSource,sessionFactory,hibernateTemplate,abstractDao,userDao,articleCache,cmsCacheAdministrator] ; root of factory hierarchy> ERROR [org.springframework.web.context.ContextLoader] - <Context initialization failed> org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'sessionFactory' defined in URL [zip:C:/bea10/user_projects/domains/DEV_BB/servers/DEV_BB_ADMIN/tmp/_WL_user/bbEAR/q8qo1b/APP-INF/lib/bbsvc-0.0.1-SNAPSHOT.jar!/hibernate-db-context.xml] : Could not resolve placeholder 'hibernate.dialect' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:268) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:75) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:553) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:527) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:362) at org.springframework.web.context.ContextLoader.createWebApplicationContext(ContextLoader.java:255) at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:199) at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:45) at weblogic.servlet.internal.EventsManager$FireContextListenerAction.run(EventsManager.java:465) at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321) at weblogic.security.service.SecurityManager.runAs(Unknown Source) at weblogic.servlet.internal.EventsManager.notifyContextCreatedEvent(EventsManager.java:175) at weblogic.servlet.internal.WebAppServletContext.preloadResources(WebAppServletContext.java:1784) at weblogic.servlet.internal.WebAppServletContext.start(WebAppServletContext.java:2999) at weblogic.servlet.internal.WebAppModule.startContexts(WebAppModule.java:1371) at weblogic.servlet.internal.WebAppModule.start(WebAppModule.java:468) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.ScopedModuleDriver.start(ScopedModuleDriver.java:200) at weblogic.application.internal.flow.ModuleListenerInvoker.start(ModuleListenerInvoker.java:117) at weblogic.application.internal.flow.ModuleStateDriver$3.next(ModuleStateDriver.java:204) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.flow.ModuleStateDriver.start(ModuleStateDriver.java:60) at weblogic.application.internal.flow.StartModulesFlow.activate(StartModulesFlow.java:27) at weblogic.application.internal.BaseDeployment$2.next(BaseDeployment.java:635) at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:37) at weblogic.application.internal.BaseDeployment.activate(BaseDeployment.java:212) at weblogic.application.internal.EarDeployment.activate(EarDeployment.java:16) at weblogic.application.internal.DeploymentStateChecker.activate(DeploymentStateChecker.java:162) at weblogic.deploy.internal.targetserver.AppContainerInvoker.activate(AppContainerInvoker.java:79) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.activate(AbstractOperation.java:569) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.activateDeployment(ActivateOperation.java:140) at weblogic.deploy.internal.targetserver.operations.ActivateOperation.doCommit(ActivateOperation.java:106) at weblogic.deploy.internal.targetserver.operations.AbstractOperation.commit(AbstractOperation.java:323) at weblogic.deploy.internal.targetserver.DeploymentManager.handleDeploymentCommit(DeploymentManager.java:820) at weblogic.deploy.internal.targetserver.DeploymentManager.activateDeploymentList(DeploymentManager.java:1227) at weblogic.deploy.internal.targetserver.DeploymentManager.handleCommit(DeploymentManager.java:436) at weblogic.deploy.internal.targetserver.DeploymentServiceDispatcher.commit(DeploymentServiceDispatcher.java:163) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.doCommitCallback(DeploymentReceiverCallbackDeliverer.java:181) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer.access$100(DeploymentReceiverCallbackDeliverer.java:12) at weblogic.deploy.service.internal.targetserver.DeploymentReceiverCallbackDeliverer$2.run(DeploymentReceiverCallbackDeliverer.java:67) at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:516) at weblogic.work.ExecuteThread.execute(ExecuteThread.java:201) at weblogic.work.ExecuteThread.run(ExecuteThread.java:173) I have used spring 1.8 and 2.0 before in other projects and have used PPC in multiple files without any issues. So, I am confused now.. Let me know if you see something is wrong in my end.
          Hide
          Jim Tomlinson added a comment -

          Is this a confirmed bug? I think I'm getting bit by it; AbstractApplicationContext.invokeBeanFactoryPostProcessors() calls the
          first PPC's postProcessBeanFactory(), which ends up throwing a BeanDefinitionStoreException() (this is in 2.5.4 codebase; see stack below).
          This exception is thrown before the second PPC's postProcessBeanFactory() method can be called to resolve the placeholder it has a value for
          (I can see the second PPC in the List of PPC's passed to AbstractApplicationContext.invokeBeanFactoryPostProcessors(),
          it just doesn't get called due to the exception).

          PropertyPlaceholderConfigurer.parseStringValue(String, Properties, Set) line: 322
          PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(String) line: 445
          BeanDefinitionVisitor.resolveStringValue(String) line: 256
          BeanDefinitionVisitor.resolveValue(Object) line: 198
          BeanDefinitionVisitor.visitPropertyValues(MutablePropertyValues) line: 142
          BeanDefinitionVisitor.visitBeanDefinition(BeanDefinition) line: 82
          PropertyPlaceholderConfigurer.processProperties(ConfigurableListableBeanFactory, Properties) line: 265
          PropertyPlaceholderConfigurer(PropertyResourceConfigurer).postProcessBeanFactory(ConfigurableListableBeanFactory) line: 75
          XmlWebApplicationContext(AbstractApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory, List) line: 554

          Show
          Jim Tomlinson added a comment - Is this a confirmed bug? I think I'm getting bit by it; AbstractApplicationContext.invokeBeanFactoryPostProcessors() calls the first PPC's postProcessBeanFactory(), which ends up throwing a BeanDefinitionStoreException() (this is in 2.5.4 codebase; see stack below). This exception is thrown before the second PPC's postProcessBeanFactory() method can be called to resolve the placeholder it has a value for (I can see the second PPC in the List of PPC's passed to AbstractApplicationContext.invokeBeanFactoryPostProcessors(), it just doesn't get called due to the exception). PropertyPlaceholderConfigurer.parseStringValue(String, Properties, Set) line: 322 PropertyPlaceholderConfigurer$PlaceholderResolvingStringValueResolver.resolveStringValue(String) line: 445 BeanDefinitionVisitor.resolveStringValue(String) line: 256 BeanDefinitionVisitor.resolveValue(Object) line: 198 BeanDefinitionVisitor.visitPropertyValues(MutablePropertyValues) line: 142 BeanDefinitionVisitor.visitBeanDefinition(BeanDefinition) line: 82 PropertyPlaceholderConfigurer.processProperties(ConfigurableListableBeanFactory, Properties) line: 265 PropertyPlaceholderConfigurer(PropertyResourceConfigurer).postProcessBeanFactory(ConfigurableListableBeanFactory) line: 75 XmlWebApplicationContext(AbstractApplicationContext).invokeBeanFactoryPostProcessors(ConfigurableListableBeanFactory, List) line: 554
          Hide
          Luke Carpenter added a comment -

          I am running into this bug also. It is forcing me to couple my PropertyPlaceholderConfigurer as one and is breaking the modular design of my application. Is there any work around for this issue?

          Show
          Luke Carpenter added a comment - I am running into this bug also. It is forcing me to couple my PropertyPlaceholderConfigurer as one and is breaking the modular design of my application. Is there any work around for this issue?
          Hide
          Rob Harrop added a comment -

          Is it possible for you to post a small sample that shows this problem in isolation? Ideally, something that runs on Tomcat.

          Regards, Rob

          Show
          Rob Harrop added a comment - Is it possible for you to post a small sample that shows this problem in isolation? Ideally, something that runs on Tomcat. Regards, Rob
          Hide
          Gisbert van Rossum added a comment -

          I just created SPR-6428 that might concern the same problem. I attached a sample project to that one to illustrate the issue.

          Show
          Gisbert van Rossum added a comment - I just created SPR-6428 that might concern the same problem. I attached a sample project to that one to illustrate the issue.
          Hide
          Chris Beams added a comment -

          All,

          Looking over the comments here carefully, there is a decent amount of reason to believe that the issue reported is actually a duplicate of SPR-6428. As such, I'm resolving this issue as a duplicate. Please see my resolution comments on SPR-6428 for a complete understanding of that (and therefore likely this) issue.

          Note however that SPR-6428 deals specifically with situations including two PPCs where the second depends on the first for $

          {...} placeholder resolution. In Gowrishankar's original correspondance with Jürgen, the two PPCs in question did not appear to have ${...}

          placeholder dependencies on one another. If in fact this is not a duplicate of SPR-6428, please reopen this issue and submit a project that reproduces the issue following the directions at https://github.com/SpringSource/spring-framework-issues#readme.

          Thanks,

          Chris

          Show
          Chris Beams added a comment - All, Looking over the comments here carefully, there is a decent amount of reason to believe that the issue reported is actually a duplicate of SPR-6428 . As such, I'm resolving this issue as a duplicate. Please see my resolution comments on SPR-6428 for a complete understanding of that (and therefore likely this) issue. Note however that SPR-6428 deals specifically with situations including two PPCs where the second depends on the first for $ {...} placeholder resolution. In Gowrishankar's original correspondance with Jürgen, the two PPCs in question did not appear to have ${...} placeholder dependencies on one another. If in fact this is not a duplicate of SPR-6428 , please reopen this issue and submit a project that reproduces the issue following the directions at https://github.com/SpringSource/spring-framework-issues#readme . Thanks, Chris

            People

            • Assignee:
              Chris Beams
              Reporter:
              Gowrishankar V
              Last updater:
              Trevor Marshall
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Days since last comment:
                2 years, 41 weeks, 5 days ago