I am using Spring 3.1.1. I have the following configuration in my applicationContext.xml to integrate EhCache with Spring.
When I run my application I get the following errorHTML Code:<!-- START EhCache Configuration --> <cache:annotation-driven cache-manager="cacheManager" proxy-target-class="true"/> <bean id="cacheManager" class="org.springframework.cache.support.CompositeCacheManager" p:fallbackToNoOpCache="true"> <property name="cacheManagers"> <list> <ref bean="ehCacheManager" /> </list> </property> </bean> <bean id="ehCacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" p:cacheManager-ref="ehCache"> <!-- <property name="configLocation" value="/WEB-INF/ehcache.xml" /> --> </bean> <bean id="ehCache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" p:config-location="/WEB-INF/ehcache.xml" /> <!-- END EhCache Configuration -->
Error setting property values; nested exception is org.springframework.beans.NotWritablePropertyExcep tion: Invalid property '
fallbackToNoOpCache' of bean class [org.springframework.cache.support.CompositeCacheMa 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 org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.applyPropertyValues(Abs tractAutowireCapableBeanFactory.java:1361
)
[java] at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.populateBean(AbstractAu towireCapableBeanFactory.java:1086)
[java] at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.doCreateBean(AbstractAu towireCapableBeanFactory.java:517)
[java] at org.springframework.beans.factory.support.Abstract AutowireCapableBeanFactory.createBean(AbstractAuto wireCapableBeanFactory.java:456)
[java] at org.springframework.beans.factory.support.Abstract BeanFactory$1.getObject(AbstractBeanFactory.java:2 95)
[java] at org.springframework.beans.factory.support.DefaultS ingletonBeanRegistry.getSingleton(DefaultSingleton BeanRegistry.java:222)
[java] at org.springframework.beans.factory.support.Abstract BeanFactory.doGetBean(AbstractBeanFactory.java:292 )
[java] at org.springframework.beans.factory.support.Abstract BeanFactory.getBean(AbstractBeanFactory.java:194)
[java] at org.springframework.beans.factory.support.BeanDefi nitionValueResolver.resolveReference(BeanDefinitio nValueResolver.java:322)
[java] ... 84 more
Does anyone know what I am doing wrong? Any help will be appreciated.


Reply With Quote
