Note that there are some explanatory texts on larger screens.

plurals
  1. POSpring annotation cache: CacheDecoratorFactory not configured for defaultCache
    primarykey
    data
    text
    <p>I'm trying to use Sping Annotation cache with EhCache. So, for first, I added the dependency to my pom.xml and configured the application-context.xml as:</p> <pre><code>&lt;ehcache:annotation-driven cache-manager="cacheManager" /&gt; &lt;ehcache:config cache-manager="cacheManager"&gt; &lt;ehcache:evict-expired-elements interval="60" /&gt; &lt;/ehcache:config&gt; &lt;bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean"&gt; &lt;property name="configLocation" value="ehcache.xml"/&gt; &lt;/bean&gt; </code></pre> <p>This is the ehcache.xml configuration file:</p> <pre><code>&lt;ehcache xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="http://ehcache.org/ehcache.xsd"&gt; &lt;defaultCache eternal="true" maxElementsInMemory="100" overflowToDisk="false" /&gt; &lt;cache name="alfresco" maxElementsInMemory="10" eternal="true" overflowToDisk="false" /&gt; &lt;/ehcache&gt; </code></pre> <p>for last, I added the Annontation @Cachable to the methods that need to be cached:</p> <pre><code>@Cacheable(value="alfresco") public EMContents getContents(RestTemplate restTemplate, String ticket, String webScriptUrl, String em_name) </code></pre> <p>I create a junit class to call two times the same method, and, it doesn't use the cache the second time (the first one doesn't create the key value).</p> <p>It seems to work fine, but I get this message: </p> <pre><code>25 Jun 2012 19:40:07 INFO EhCacheManagerFactoryBean:100 - Initializing EHCache CacheManager 25 Jun 2012 19:40:07 DEBUG ConfigurationFactory:148 - Configuring ehcache from InputStream 25 Jun 2012 19:40:07 DEBUG BeanHandler:271 - Ignoring ehcache attribute xmlns:xsi 25 Jun 2012 19:40:07 DEBUG BeanHandler:271 - Ignoring ehcache attribute xsi:noNamespaceSchemaLocation 25 Jun 2012 19:40:07 DEBUG PropertyUtil:88 - propertiesString is null. 25 Jun 2012 19:40:07 DEBUG CacheManager:605 - No disk store path defined. Skipping disk store path conflict test. 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:184 - No CacheManagerEventListenerFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:949 - No BootstrapCacheLoaderFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:923 - CacheWriter factory not configured. Skipping... 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:96 - No CacheExceptionHandlerFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:949 - No BootstrapCacheLoaderFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:923 - CacheWriter factory not configured. Skipping... 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:96 - No CacheExceptionHandlerFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:949 - No BootstrapCacheLoaderFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:923 - CacheWriter factory not configured. Skipping... 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:96 - No CacheExceptionHandlerFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:949 - No BootstrapCacheLoaderFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:923 - CacheWriter factory not configured. Skipping... 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:96 - No CacheExceptionHandlerFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:949 - No BootstrapCacheLoaderFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:923 - CacheWriter factory not configured. Skipping... 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:96 - No CacheExceptionHandlerFactory class specified. Skipping... 25 Jun 2012 19:40:07 DEBUG Cache:1183 - Initialised cache: alfresco_action 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:331 - CacheDecoratorFactory not configured. Skipping for 'alfresco_action'. 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:360 - CacheDecoratorFactory not configured for defaultCache. Skipping for 'alfresco_action'. 25 Jun 2012 19:40:07 DEBUG Cache:1183 - Initialised cache: alfresco 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:331 - CacheDecoratorFactory not configured. Skipping for 'alfresco'. 25 Jun 2012 19:40:07 DEBUG ConfigurationHelper:360 - CacheDecoratorFactory not configured for defaultCache. Skipping for 'alfresco'. 25 Jun 2012 19:40:07 DEBUG DefaultListableBeanFactory:458 - Finished creating instance of bean 'cacheManager' </code></pre> <p>Any clue? Something seems to be wrong with my configuration. </p> <p>Thanks for your time<br />Andrea</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload