我有在 2.5.1 版本中开发的 Grails web 项目。它在 Tomcat 7.0.63 中运行良好。当我在 Tomcat 8.0.33 中部署相同的运行 WAR 文件时,它给出了 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 文件,那么它可以工作。但这样做似乎很愚蠢。