Results 1 to 4 of 4

Thread: The CacheManager is not alive.

  1. #1
    Join Date
    Oct 2004
    Location
    Moscow
    Posts
    32

    Default 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. #2
    Luke Taylor is offline Senior Member Acegi Security System TeamSpring Team
    Join Date
    Aug 2004
    Location
    Glasgow, Scotland
    Posts
    3,449

    Default

    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.

  3. #3
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    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.

  4. #4
    Join Date
    Jan 2005
    Location
    Bucharest, Romania
    Posts
    5,403

    Default

    You can find the problem and the solution here: http://forum.springframework.org/sho...ed=1#post55833
    Costin Leau
    SpringSource - http://www.SpringSource.com- Spring Training, Consulting, and Support - "From the Source"
    http://twitter.com/costinl
    Please use [ c o d e ] [ / c o d e ] tags

Similar Threads

  1. userCache is not alive
    By Costin Leau in forum Container
    Replies: 3
    Last Post: Mar 24th, 2006, 11:20 AM
  2. EHCaching Hibernate
    By dencamel in forum Data
    Replies: 3
    Last Post: Sep 6th, 2005, 09:03 PM
  3. Replies: 7
    Last Post: Aug 17th, 2004, 03:26 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •