java.lang.IllegalStateException: An implementation of CacheProviderFacade should be registered under the name 'cacheProvider'

Spring JIRA | Craig Walls | 1 decade ago
  1. 0

    When using the <??cache:proxy> configuration element, the "cacheProvider" bean (or the bean referred to by the providerId attribute) must appear in the context XML before the <??cache:proxy> element. For instance, the following will work... <bean id="cacheProvider" class="org.springmodules.cache.provider.ehcache.EhCacheFacade"> <property name="cacheManager" ref="cacheManager" /> </bean> <ehcache:proxy id="slowService" refId="slowServiceTarget" providerId="cacheProvider" > <ehcache:caching methodName="get*" cacheName="firstCache" /> </ehcache:proxy> But this will not work: <ehcache:proxy id="slowService" refId="slowServiceTarget" providerId="cacheProvider" > <ehcache:caching methodName="get*" cacheName="firstCache" /> </ehcache:proxy> <bean id="cacheProvider" class="org.springmodules.cache.provider.ehcache.EhCacheFacade"> <property name="cacheManager" ref="cacheManager" /> </bean> In this case, the following exception/stacktrace is thrown: Exception in thread "main" java.lang.IllegalStateException: An implementation of CacheProviderFacade should be registered under the name 'cacheProvider' at org.springmodules.cache.config.AbstractCacheSetupStrategyParser.parse(AbstractCacheSetupStrategyParser.java:93) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:78) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1087) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:544) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:339) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:314) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:278) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68) at com.habuma.cache.SlowServiceRunner.main(SlowServiceRunner.java:8)

    Spring JIRA | 1 decade ago | Craig Walls
    java.lang.IllegalStateException: An implementation of CacheProviderFacade should be registered under the name 'cacheProvider'
  2. 0

    When using the <??cache:proxy> configuration element, the "cacheProvider" bean (or the bean referred to by the providerId attribute) must appear in the context XML before the <??cache:proxy> element. For instance, the following will work... <bean id="cacheProvider" class="org.springmodules.cache.provider.ehcache.EhCacheFacade"> <property name="cacheManager" ref="cacheManager" /> </bean> <ehcache:proxy id="slowService" refId="slowServiceTarget" providerId="cacheProvider" > <ehcache:caching methodName="get*" cacheName="firstCache" /> </ehcache:proxy> But this will not work: <ehcache:proxy id="slowService" refId="slowServiceTarget" providerId="cacheProvider" > <ehcache:caching methodName="get*" cacheName="firstCache" /> </ehcache:proxy> <bean id="cacheProvider" class="org.springmodules.cache.provider.ehcache.EhCacheFacade"> <property name="cacheManager" ref="cacheManager" /> </bean> In this case, the following exception/stacktrace is thrown: Exception in thread "main" java.lang.IllegalStateException: An implementation of CacheProviderFacade should be registered under the name 'cacheProvider' at org.springmodules.cache.config.AbstractCacheSetupStrategyParser.parse(AbstractCacheSetupStrategyParser.java:93) at org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:78) at org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1087) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140) at org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:544) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:339) at org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:314) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142) at org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113) at org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79) at org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89) at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:278) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77) at org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68) at com.habuma.cache.SlowServiceRunner.main(SlowServiceRunner.java:8)

    Spring JIRA | 1 decade ago | Craig Walls
    java.lang.IllegalStateException: An implementation of CacheProviderFacade should be registered under the name 'cacheProvider'
  3. 0

    GitHub comment 21#121115703

    GitHub | 1 year ago | SteamingSugar
    java.lang.IllegalStateException: TTT v0.7.2 attempted to hook into MGLib while an instance of the API was already registered. This is a bug, and should be reported this to the author(s) of the hooking plugin (Maxim Roncac�)
  4. Speed up your debug routine!

    Automated exception search integrated into your IDE

  5. 0

    Could not find an implementation of ClassAnalyzer with name CdiInjecteeSkippingClassAnalyzer

    GitHub | 1 month ago | fisherab
    java.lang.IllegalStateException: Could not find an implementation of ClassAnalyzer with name CdiInjecteeSkippingClassAnalyzer
  6. 0

    users.openejb.apache.org - Cannot instantiate class: org.openejb.client.LocalInitialContextFactory - msg#00033 - Recent Discussion OSDir.com

    osdir.com | 1 year ago
    java.lang.IllegalStateException: InternalError: an entity manager should already be registered for this entended persistence unit

    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. java.lang.IllegalStateException

      An implementation of CacheProviderFacade should be registered under the name 'cacheProvider'

      at org.springmodules.cache.config.AbstractCacheSetupStrategyParser.parse()
    2. spring-modules-cache
      AbstractCacheSetupStrategyParser.parse
      1. org.springmodules.cache.config.AbstractCacheSetupStrategyParser.parse(AbstractCacheSetupStrategyParser.java:93)
      1 frame
    3. Spring Beans
      AbstractBeanDefinitionReader.loadBeanDefinitions
      1. org.springframework.beans.factory.xml.NamespaceHandlerSupport.parse(NamespaceHandlerSupport.java:78)
      2. org.springframework.beans.factory.xml.BeanDefinitionParserDelegate.parseCustomElement(BeanDefinitionParserDelegate.java:1087)
      3. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.parseBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:140)
      4. org.springframework.beans.factory.xml.DefaultBeanDefinitionDocumentReader.registerBeanDefinitions(DefaultBeanDefinitionDocumentReader.java:93)
      5. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.registerBeanDefinitions(XmlBeanDefinitionReader.java:544)
      6. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.doLoadBeanDefinitions(XmlBeanDefinitionReader.java:390)
      7. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:339)
      8. org.springframework.beans.factory.xml.XmlBeanDefinitionReader.loadBeanDefinitions(XmlBeanDefinitionReader.java:314)
      9. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:126)
      10. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:142)
      11. org.springframework.beans.factory.support.AbstractBeanDefinitionReader.loadBeanDefinitions(AbstractBeanDefinitionReader.java:168)
      11 frames
    4. Spring Context
      ClassPathXmlApplicationContext.<init>
      1. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:113)
      2. org.springframework.context.support.AbstractXmlApplicationContext.loadBeanDefinitions(AbstractXmlApplicationContext.java:79)
      3. org.springframework.context.support.AbstractRefreshableApplicationContext.refreshBeanFactory(AbstractRefreshableApplicationContext.java:89)
      4. org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:278)
      5. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:92)
      6. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:77)
      7. org.springframework.context.support.ClassPathXmlApplicationContext.<init>(ClassPathXmlApplicationContext.java:68)
      7 frames
    5. com.habuma.cache
      SlowServiceRunner.main
      1. com.habuma.cache.SlowServiceRunner.main(SlowServiceRunner.java:8)
      1 frame