• Bug
  • Status: Closed
  • 2 Major
  • Resolution: Not a Bug
  • ehcache-core
  • drb
  • Reporter: jesmith
  • January 13, 2011
  • 0
  • Watchers: 1
  • July 27, 2012
  • January 18, 2011

Description

Running 2.4.0-SNAPSHOT against a clsutered terracotta backend. Deployment gets the following error

Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name ‘cacheManager’ defined in class path resource [applicationContext.xml]: Invocation of init method failed; nested exception is java.lang.NoClassDefFoundError: net/sf/ehcache/config/TerracottaConfigConfiguration 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.beans.factory.config.BeanExpressionContext.getObject(BeanExpressionContext.java:56) at org.springframework.context.expression.BeanExpressionContextAccessor.read(BeanExpressionContextAccessor.java:40) at org.springframework.expression.spel.ast.PropertyOrFieldReference.readProperty(PropertyOrFieldReference.java:195) at org.springframework.expression.spel.ast.PropertyOrFieldReference.getValueInternal(PropertyOrFieldReference.java:71) at org.springframework.expression.spel.ast.CompoundExpression.getValueInternal(CompoundExpression.java:52) at org.springframework.expression.spel.ast.SpelNodeImpl.getValue(SpelNodeImpl.java:93) at org.springframework.expression.spel.standard.SpelExpression.getValue(SpelExpression.java:88) at org.springframework.context.expression.StandardBeanExpressionResolver.evaluate(StandardBeanExpressionResolver.java:138) … 92 more Caused by: java.lang.NoClassDefFoundError: net/sf/ehcache/config/TerracottaConfigConfiguration at java.lang.Class.getDeclaredConstructors0(Native Method) at java.lang.Class.privateGetDeclaredConstructors(Class.java:2389) at java.lang.Class.getConstructor0(Class.java:2699) at java.lang.Class.getConstructor(Class.java:1657) at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:91) at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:176) at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:175) at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:135) at net.sf.ehcache.CacheManager.init(CacheManager.java:337) at net.sf.ehcache.CacheManager.(CacheManager.java:281) at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:112) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1477) at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1417)

Comments

Josh Smith 2011-01-14

This should be adjusted. I fixed the issue above by moving to the 2.2 version of ehcache-terracotta library. However, the StandalongTerracottaClusterdInstanceFactory in that version is dependent on a net.sf.ehcache.transaction.xa.EhacheXAStore class, which I can not find.

By package structure, I would assume that class should have been part of the base ehache-core2.4.0 library as it contains other classes in that package.

However, that it turn looks like you have a potential cyclic dependency between those two libraries.