2016-05-16 131 views
1

我有在2.5.1版本中開發的Grails Web項目。它在Tomcat 7.0.63中工作正常。當我的Tomcat 8.0.33中部署相同的運行WAR文件,它提供了Ehcache錯誤:將Tomcat 7中的Grails WAR文件部署到Tomcat 8會導致Ehcache錯誤

Caused by: org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.ehcache.EhCacheFactoryBean]: Constructor threw exception; nested exception is java.lang.NoSuchMethodError: org.springframework.cache.ehcache.EhCacheFactoryBean.setMaxEntriesLocalHeap(J)V 

我知道這是由於ehcache的舊版本,但同樣戰爭中的Tomcat 7做工精細,所以,什麼是錯的Tomcat 8?

任何幫助將是偉大的。

謝謝。

更新:如果我用Tomcat 7替換Tomcat 8的所有jar文件,那麼它的工作原理。但這似乎是愚蠢的事情。

回答

0

項目中有多個ehcache jar文件。 Hibernate緩存和彈簧緩存,似乎像Spring Cache指向Tomcat8中的舊jar。我們強制排除ehcache-core,它工作。

欲瞭解更多信息:Exclude plugin