Hi All
Unit test of my Spring Batch based application are failing due to following error. Can anyone please help me out
I am running my unit test though maven.Code:Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheInterceptor' defined in URL [jar:file:/C:/Users/rafiquea/.m2/repository/org/springframework/batch/spring-batch-admin-manager/1.2.1.RELEASE/spring-batch-admin-manager-1.2.1.RELEASE.jar!/META-INF/spring/batch/bootstrap/manager/jmx-context.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.ObjectExistsException: Cache simple already exists at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1420) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:519) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:456) at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:291) at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:288) at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:190) at org.springframework.aop.framework.ProxyFactoryBean.initializeAdvisorChain(ProxyFactoryBean.java:454) at org.springframework.aop.framework.ProxyFactoryBean.getObject(ProxyFactoryBean.java:240) at org.springframework.beans.factory.support.FactoryBeanRegistrySupport.doGetObjectFromFactoryBean(FactoryBeanRegistrySupport.java:142) ... 58 more Caused by: net.sf.ehcache.ObjectExistsException: Cache simple already exists at net.sf.ehcache.CacheManager.addCacheNoCheck(CacheManager.java:993) at net.sf.ehcache.CacheManager.addCache(CacheManager.java:938) at net.sf.ehcache.CacheManager.addCache(CacheManager.java:916) at org.springframework.batch.admin.util.SimpleEhCacheInterceptor.afterPropertiesSet(SimpleEhCacheInterceptor.java:77) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417) ... 67 more


Reply With Quote
