Announcement Announcement Module
Collapse
No announcement yet.
The CacheManager is not alive. Page Title Module
Move Remove Collapse
This topic is closed
X
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • The CacheManager is not alive.

    After stoping Tomcat 5 my spring.log containts:


    support.AbstractBeanFactory Retrieving dependent beans for bean 'userCache'
    07.апр.2005 18:19:05,139 support.AbstractBeanFactory$1 Invoking destroy() on bean with name 'userCache'
    07.апр.2005 18:19:05,171 support.AbstractBeanFactory Destroy method on bean with name 'userCache' threw an exception
    java.lang.IllegalStateException: The CacheManager is not alive.
    at net.sf.ehcache.CacheManager.checkStatus(CacheManag er.java:417)
    at net.sf.ehcache.CacheManager.removeCache(CacheManag er.java:355)
    at net.sf.acegisecurity.providers.dao.cache.EhCacheBa sedUserCache.destroy(EhCacheBasedUserCache.java:11 3)

    Code:
    <bean id="daoAuthenticationProvider" class="net.sf.acegisecurity.providers.dao.DaoAuthenticationProvider">
             <property name="authenticationDao"><ref local="jdbcAuthenticationDao"/></property>
             <property name="userCache"><ref local="userCache"/></property>
        </bean>
    
        <bean id="userCache" class="net.sf.acegisecurity.providers.dao.cache.EhCacheBasedUserCache">
             <property name="minutesToIdle" value="5"/>
        </bean>

    What's wrong? Where is my mistake?

  • #2
    My guess is that the EhCache CacheManager has already been shutdown during the beanfactory destruction, prior to the call to remove.

    What versions of Spring/Acegi are you using. There isn't a "destroy" method on EhCacheBasedUserCache in the current version. It was refactored 4 months ago and the cache lifecycle stuff should now be handled by Spring rather than Acegi.

    Can you try using the latest release?

    Luke.

    Comment


    • #3
      In more recent Acegi Security versions, the EH-CACHE instance is now managed by the Spring IoC container. If you upgrade to later versions of Spring and Acegi Security, you should find the problem fixed.

      Comment


      • #4
        You can find the problem and the solution here: http://forum.springframework.org/sho...ed=1#post55833

        Comment

        Working...
        X