Announcement Announcement Module
No announcement yet.
EhCaching CompositeCacheManager Error Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • EhCaching CompositeCacheManager Error

    I am using Spring 3.1.1. I have the following configuration in my applicationContext.xml to integrate EhCache with Spring.

    HTML Code:
    <!-- START EhCache Configuration -->
    	<cache:annotation-driven cache-manager="cacheManager" proxy-target-class="true"/>
    	<bean id="cacheManager" class="" p:fallbackToNoOpCache="true">
    		<property name="cacheManagers">
    				<ref bean="ehCacheManager" />
    <bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehCache">
    		<!-- <property name="configLocation" value="/WEB-INF/ehcache.xml" /> -->
    	<bean id="ehCache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="/WEB-INF/ehcache.xml" />
    	<!-- END EhCache Configuration -->
    When I run my application I get the following error

    Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property '
    fallbackToNoOpCache' of bean class [ nager]: Bean property 'fallbackToNoOpCache' is not writable or has an invalid setter method. Does the parameter type of the setter match the return type of the getter?
    [java] at AutowireCapableBeanFactory.applyPropertyValues(Abs
    [java] at AutowireCapableBeanFactory.populateBean(AbstractAu
    [java] at AutowireCapableBeanFactory.doCreateBean(AbstractAu
    [java] at AutowireCapableBeanFactory.createBean(AbstractAuto
    [java] at BeanFactory$1.getObject( 95)
    [java] at ingletonBeanRegistry.getSingleton(DefaultSingleton
    [java] at BeanFactory.doGetBean( )
    [java] at BeanFactory.getBean(
    [java] at nitionValueResolver.resolveReference(BeanDefinitio
    [java] ... 84 more

    Does anyone know what I am doing wrong? Any help will be appreciated.

  • #2
    This forum is for the Spring Integration Project

    That said, I can't reproduce your problem, fallbackToNoOpCache has a setter of type boolean, and code very similar to yours works fine for me.

    Can you run with debug for org.springframework.* and post the entire bean initialization sequence, and full stack trace, in a zip?


    • #3
      Thanks for your quick response Gary. I posted it under Integration because Cache Abstraction is documented under Integration. Sorry about that.

      Find attached the bean initialization sequence and full stack trace as requested.


      • #4
        Hi Rosemary,

        Unfortunately, this only has INFO level logs; as I mentioned...

        Can you run with DEBUG for org.springframework.* and post ...
        Spring emits lots of useful diagnostics under DEBUG.

        I am happy to continue to try to help, but you may get a faster response from somebody more familiar with cache here...