2015-07-24 4 views
0

Je reçois l'exception ci-dessous lorsque j'essaie de démarrer Tomcat avec mon application. J'ai les bocaux ehcache-ee-2.10 et terracotta-toolkit dans le dossier approuvé de tomcat. Je n'ai pas non plus de gestionnaire de transactions utilisé dans mon application car il n'y en a pas besoin. Est-il possible de configurer ehcache pour ne pas utiliser de transaction? Toutes les suggestions sont très appréciées.Problème d'initialisation de Terracotta 4.3

DEBUG 2015-07-24 11:44:07,623 (net.sf.ehcache.config.BeanHandler) - Ignoring ehcache attribute xmlns:xsi 
DEBUG 2015-07-24 11:44:07,623 (net.sf.ehcache.config.BeanHandler) - Ignoring ehcache attribute xsi:noNamespaceSchemaLocation 
DEBUG 2015-07-24 11:44:07,631 (net.sf.ehcache.util.PropertyUtil) - propertiesString is null. 
ERROR 2015-07-24 11:44:07,631 (net.sf.ehcache.config.Configuration) - could not instantiate transaction manager lookup class: net.sf.ehcache.transaction.manager.DefaultTransactionManagerLookup 
java.lang.NullPointerException 
at net.sf.ehcache.config.Configuration$RuntimeCfg.<init>(Configuration.java:1215) 
at net.sf.ehcache.config.Configuration.setupFor(Configuration.java:252) 
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:436) 
at net.sf.ehcache.CacheManager.init(CacheManager.java:395) 
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:356) 
at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:138) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) 
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) 
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) 
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608) 
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) 
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) 
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) 
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) 
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) 
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
at java.lang.Thread.run(Thread.java:722) 
INFO 2015-07-24 11:44:07,633 (net.sf.ehcache.terracotta.TerracottaClient) - Thread [Thread-2] [cacheManager: 'accountApplicationCache']: Creating new ClusteredInstanceFactory 
ERROR 2015-07-24 11:44:07,636(org.springframework.web.context.ContextLoader) - Context initialization failed 
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'accountCacheManager' defined in URL [file:/C:/dev/apache-tomcat-7.0.16_1/webapps/account/WEB-INF/classes/context/account-cacheloader.xml]: Invocation of init method failed; nested exception is net.sf.ehcache.CacheException: java.lang.NullPointerException 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1486) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:524) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:461) 
at org.springframework.beans.factory.support.AbstractBeanFactory$1.getObject(AbstractBeanFactory.java:295) 
at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:223) 
at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:292) 
at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:194) 
at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:608) 
at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:932) 
at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:479) 
at org.springframework.web.context.ContextLoader.configureAndRefreshWebApplicationContext(ContextLoader.java:389) 
at org.springframework.web.context.ContextLoader.initWebApplicationContext(ContextLoader.java:294) 
at org.springframework.web.context.ContextLoaderListener.contextInitialized(ContextLoaderListener.java:112) 
at org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4723) 
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5226) 
at org.apache.catalina.core.StandardContext$1.call(StandardContext.java:5221) 
at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) 
at java.util.concurrent.FutureTask.run(FutureTask.java:166) 
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) 
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) 
at java.lang.Thread.run(Thread.java:722) 
Caused by: net.sf.ehcache.CacheException: java.lang.NullPointerException 
at net.sf.ehcache.CacheManager.init(CacheManager.java:426) 
at net.sf.ehcache.CacheManager.<init>(CacheManager.java:356) 
at org.springframework.cache.ehcache.EhCacheManagerFactoryBean.afterPropertiesSet(EhCacheManagerFactoryBean.java:138) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1545) 
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1483) 
... 20 more 
Caused by: java.lang.NullPointerException 
at net.sf.ehcache.util.ClassLoaderUtil.createNewInstance(ClassLoaderUtil.java:65) 
at net.sf.ehcache.terracotta.TerracottaClusteredInstanceHelper.newClusteredInstanceFactory(TerracottaClusteredInstanceHelper.java:157) 
at net.sf.ehcache.terracotta.TerracottaClient.createNewClusteredInstanceFactory(TerracottaClient.java:180) 
at net.sf.ehcache.terracotta.TerracottaClient.createClusteredInstanceFactory(TerracottaClient.java:129) 
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:463) 
at net.sf.ehcache.CacheManager.init(CacheManager.java:395) 
... 24 more 

Merci à l'avance

+0

À quoi ressemble votre ehcache.xml? –

Répondre

0

Peut-être que vous avez la version Tookit incorrecte. J'ai réussi avec les dépendances:

 <dependency> 
      <groupId>net.sf.ehcache</groupId> 
      <artifactId>ehcache</artifactId> 
      <version>2.10.0</version> 
     </dependency> 

     <dependency> 
      <groupId>org.terracotta</groupId> 
      <artifactId>terracotta-toolkit-runtime</artifactId> 
      <version>4.3.0</version> 
     </dependency>