org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'loggingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'targetClassShortName'

Spring JIRA | Matthew Sgarlata | 1 decade ago
tip
Do you know that we can give you better hits? Get more relevant results from Samebug’s stack trace search.
  1. 0

    The definition below does not work with the PropertyPlaceholderConfigurer because the PropertyPlaceholderConfigurer attempts to resolve the placeholders itself rather than leaving them to be resolved by the interceptor. <bean name="loggingInterceptor" class="org.springframework.aop.interceptor.CustomizableTraceInterceptor"> <property name="enterMessageTemplate" value="BEGIN ${targetClassShortName}.${methodName}({$arguments})"/> <property name="exitMessageTemplate" value="END ${targetClassShortName}.${methodName}({$arguments}). Return value was ${returnValue}"/> </bean> The exception message is: ERROR (DispatcherServlet:initServletBean) - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'loggingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'targetClassShortName' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:223) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:184) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:366) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133) at com.spider.scoreboard.framework.springx.ScoreboardApplicationContext.refresh(ScoreboardApplicationContext.java:73) at com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.loadContext(ScoreboardContextLoaderServlet.java:294) at com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.startupOrRestart(ScoreboardContextLoaderServlet.java:129) at com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.init(ScoreboardContextLoaderServlet.java:84) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.sart(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) I think the CustomizableTraceInterceptor should be modified so that $targetClassShortName is treated the same as ${targetClassShortName}

    Spring JIRA | 1 decade ago | Matthew Sgarlata
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'loggingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'targetClassShortName'
  2. 0

    The definition below does not work with the PropertyPlaceholderConfigurer because the PropertyPlaceholderConfigurer attempts to resolve the placeholders itself rather than leaving them to be resolved by the interceptor. <bean name="loggingInterceptor" class="org.springframework.aop.interceptor.CustomizableTraceInterceptor"> <property name="enterMessageTemplate" value="BEGIN ${targetClassShortName}.${methodName}({$arguments})"/> <property name="exitMessageTemplate" value="END ${targetClassShortName}.${methodName}({$arguments}). Return value was ${returnValue}"/> </bean> The exception message is: ERROR (DispatcherServlet:initServletBean) - Context initialization failed org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'loggingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'targetClassShortName' at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:223) at org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:184) at org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:366) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292) at org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133) at com.spider.scoreboard.framework.springx.ScoreboardApplicationContext.refresh(ScoreboardApplicationContext.java:73) at com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.loadContext(ScoreboardContextLoaderServlet.java:294) at com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.startupOrRestart(ScoreboardContextLoaderServlet.java:129) at com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.init(ScoreboardContextLoaderServlet.java:84) at javax.servlet.GenericServlet.init(GenericServlet.java:211) at org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091) at org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925) at org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857) at org.apache.catalina.core.StandardContext.start(StandardContext.java:4118) at org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759) at org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739) at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524) at org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589) at org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536) at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471) at org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102) at org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311) at org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020) at org.apache.catalina.core.StandardHost.start(StandardHost.java:718) at org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012) at org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442) at org.apache.catalina.core.StandardService.sart(StandardService.java:450) at org.apache.catalina.core.StandardServer.start(StandardServer.java:683) at org.apache.catalina.startup.Catalina.start(Catalina.java:537) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271) at org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409) I think the CustomizableTraceInterceptor should be modified so that $targetClassShortName is treated the same as ${targetClassShortName}

    Spring JIRA | 1 decade ago | Matthew Sgarlata
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'loggingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'targetClassShortName'
  3. 0

    Spring Error 500

    Coderanch | 9 years ago | Gajanan Bandale
    org.springframework.beans.factory.BeanDefinitionStoreException: Error registering bean with name 'smpcConfig' defined in ServletContext resource [/WEB-INF/smpc-servlet.xml]: Could not resolve placeholder 'pwdmanager.security.rootFolder'
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Tomcat server is running,getting 404 error

    Stack Overflow | 4 years ago | Kris27
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'CWSJMSClient' defined in class path resource [SpringIntegration.xml]: Could not resolve placeholder 'VHF.CWS.Hybrid.Contract.RequestQueue'
  6. 0

    Spring ,could not resolve place holder,can someone explain me

    Stack Overflow | 4 years ago | Kris27
    org.springframework.beans.factory.BeanDefinitionStoreException: Invalid bean definition with name 'CWSJMSClient' defined in class path resource [SpringIntegration.xml]: Could not resolve placeholder 'VHF.CWS.Hybrid.Contract.RequestQueue'

  1. odd 4 times, last 4 days ago
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

    Error registering bean with name 'loggingInterceptor' defined in ServletContext resource [/WEB-INF/applicationContext.xml]: Could not resolve placeholder 'targetClassShortName'

    at org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties()
  2. Spring Beans
    PropertyResourceConfigurer.postProcessBeanFactory
    1. org.springframework.beans.factory.config.PropertyPlaceholderConfigurer.processProperties(PropertyPlaceholderConfigurer.java:223)
    2. org.springframework.beans.factory.config.PropertyResourceConfigurer.postProcessBeanFactory(PropertyResourceConfigurer.java:184)
    2 frames
  3. Spring Context
    AbstractApplicationContext.refresh
    1. org.springframework.context.support.AbstractApplicationContext.invokeBeanFactoryPostProcessors(AbstractApplicationContext.java:366)
    2. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:292)
    2 frames
  4. Spring
    AbstractRefreshableWebApplicationContext.refresh
    1. org.springframework.web.context.support.AbstractRefreshableWebApplicationContext.refresh(AbstractRefreshableWebApplicationContext.java:133)
    1 frame
  5. com.spider.scoreboard
    ScoreboardContextLoaderServlet.init
    1. com.spider.scoreboard.framework.springx.ScoreboardApplicationContext.refresh(ScoreboardApplicationContext.java:73)
    2. com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.loadContext(ScoreboardContextLoaderServlet.java:294)
    3. com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.startupOrRestart(ScoreboardContextLoaderServlet.java:129)
    4. com.spider.scoreboard.framework.springx.ScoreboardContextLoaderServlet.init(ScoreboardContextLoaderServlet.java:84)
    4 frames
  6. JavaServlet
    GenericServlet.init
    1. javax.servlet.GenericServlet.init(GenericServlet.java:211)
    1 frame
  7. Glassfish Core
    Catalina.start
    1. org.apache.catalina.core.StandardWrapper.loadServlet(StandardWrapper.java:1091)
    2. org.apache.catalina.core.StandardWrapper.load(StandardWrapper.java:925)
    3. org.apache.catalina.core.StandardContext.loadOnStartup(StandardContext.java:3857)
    4. org.apache.catalina.core.StandardContext.start(StandardContext.java:4118)
    5. org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:759)
    6. org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:739)
    7. org.apache.catalina.core.StandardHost.addChild(StandardHost.java:524)
    8. org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:589)
    9. org.apache.catalina.startup.HostConfig.deployDescriptors(HostConfig.java:536)
    10. org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:471)
    11. org.apache.catalina.startup.HostConfig.start(HostConfig.java:1102)
    12. org.apache.catalina.startup.HostConfig.lifecycleEvent(HostConfig.java:311)
    13. org.apache.catalina.util.LifecycleSupport.fireLifecycleEvent(LifecycleSupport.java:119)
    14. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1020)
    15. org.apache.catalina.core.StandardHost.start(StandardHost.java:718)
    16. org.apache.catalina.core.ContainerBase.start(ContainerBase.java:1012)
    17. org.apache.catalina.core.StandardEngine.start(StandardEngine.java:442)
    18. org.apache.catalina.core.StandardService.sart(StandardService.java:450)
    19. org.apache.catalina.core.StandardServer.start(StandardServer.java:683)
    20. org.apache.catalina.startup.Catalina.start(Catalina.java:537)
    20 frames
  8. Java RT
    Method.invoke
    1. sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    2. sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    3. sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    4. java.lang.reflect.Method.invoke(Method.java:585)
    4 frames
  9. Glassfish Core
    Bootstrap.main
    1. org.apache.catalina.startup.Bootstrap.start(Bootstrap.java:271)
    2. org.apache.catalina.startup.Bootstrap.main(Bootstrap.java:409)
    2 frames