3

例外を解決する方法:

構成は次のとおりです。

     <bean id="cacheManager" class="org.springframework.cache.ehcache.EhCacheCacheManager" 
  p:cacheManager-ref="ehcache" lazy-init="true"/>

 <bean id="ehcache" class="org.springframework.cache.ehcache.EhCacheManagerFactoryBean" 
     p:configLocation="ehcache.xml"  
     p:shared="true"/> 
</beans>

例外 :

Caused by: net.sf.ehcache.ObjectExistsException: Cache simple already exists
at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:993) [ehcache-core-2.3.0.jar:]
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:938) [ehcache-core-2.3.0.jar:]
at net.sf.ehcache.CacheManager.addCache(CacheManager.java:916) [ehcache-core-2.3.0.jar:]
at org.springframework.batch.admin.util.SimpleEhCacheInterceptor.afterPropertiesSet(SimpleEhCacheInterceptor.java:77) [spring-batch-admin-manager-1.2.2.BUILD-SNAPSHOT.jar:]
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545) [spring-beans-3.2.0.RELEASE.jar:3.2.0.RELEASE]
4

1 に答える 1