栏目分类:
子分类:
返回
名师互学网用户登录
快速导航关闭
当前搜索
当前分类
子分类
实用工具
热门搜索
名师互学网 > IT > 前沿技术 > 大数据 > 大数据系统

缓存ehcache启动失败Factory method ‘ehCacheCacheManager‘ threw exception

缓存ehcache启动失败Factory method ‘ehCacheCacheManager‘ threw exception

启动失败了,报了如下错误:

org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'ehCacheCacheManager' defined in class path resource [org/springframework/boot/autoconfigure/cache/EhCacheCacheConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [net.sf.ehcache.CacheManager]: Factory method 'ehCacheCacheManager' threw exception; nested exception is net.sf.ehcache.CacheException: java.lang.annotation.IncompleteAnnotationException: org.terracotta.statistics.Statistic missing element type

以前一直在用,没有问题,新项目报错。

新项目唯一不同的是使用了easyexcel得错误生成pom

查看easyexcel的pom.xml,找到了这个

        
            com.github.duanyashu
            easyExcel-errorExport
            1.1.1   
        

基本上定位问题所在了,org.ehcache和net.sf.ehcache有冲突,那么既然easyexcel已经引用了,我们就去掉net.sf.ehcache。

然后依然报错,有了新的提示,告诉我们无法连接redis,懂了。

那么我们尝试一下用net.sf.ehcache,排除org.ehcache。

 
            com.github.duanyashu
            easyExcel-errorExport
            1.1.1
            
                
                    org.ehcache
                    ehcache
                
            
 

启动成功了。

转载请注明:文章转载自 www.mshxw.com
本文地址:https://www.mshxw.com/it/707154.html
我们一直用心在做
关于我们 文章归档 网站地图 联系我们

版权所有 (c)2021-2022 MSHXW.COM

ICP备案号:晋ICP备2021003244-6号