0


引入easyExcel后,导致springboot项目无法开启tomcat

报错信息:

Caused by:java.lang.annotation.IncompleteAnnotationException:org.terracotta.statistics.Statistic missing element type
at sun.reflect.annotation.AnnotationInvocationHandler.invoke(AnnotationInvocationHandler.java:81)
at com.sun.proxy.$Proxy108.type(UnknownSource)
at org.terracotta.statistics.StatisticsManager.parseStatisticAnnotations(StatisticsManager.java:114)
at org.terracotta.context.ContextManager.contextCreated(ContextManager.java:183)
at org.terracotta.context.ContextManager.getOrCreateTreeNode(ContextManager.java:136)
at org.terracotta.context.ContextManager.associate(ContextManager.java:114)
at org.terracotta.context.ContextManager.access$000(ContextManager.java:38)
at org.terracotta.context.ContextManager$1.withChild(ContextManager.java:57)
at org.terracotta.statistics.StatisticsManager.createOperationStatistic(StatisticsManager.java:55)
at org.terracotta.statistics.StatisticsManager.createOperationStatistic(StatisticsManager.java:50)
at net.sf.ehcache.statistics.StatisticBuilder$OperationStatisticBuilder.build(StatisticBuilder.java:79)
at net.sf.ehcache.Cache.<init>(Cache.java:268)
at net.sf.ehcache.config.ConfigurationHelper.createCache(ConfigurationHelper.java:305)
at net.sf.ehcache.config.ConfigurationHelper.createDefaultCache(ConfigurationHelper.java:223)
at net.sf.ehcache.CacheManager.configure(CacheManager.java:788)
at net.sf.ehcache.CacheManager.doInit(CacheManager.java:474)
at net.sf.ehcache.CacheManager.init(CacheManager.java:398)

报错原因:
org.ehcache和net.sf.ehcache有冲突,导入了两个版本的encache包。只需要排除其中一个包就可以正常运行了。排除easyExcel里面的ehcache即可。

解决方案:

<!-- excel --><dependency><groupId>com.alibaba</groupId><artifactId>easyexcel</artifactId><version>2.1.7</version><exclusions><exclusion><artifactId>ehcache</artifactId><groupId>org.ehcache</groupId></exclusion></exclusions></dependency>

本文转载自: https://blog.csdn.net/qq453660983/article/details/133354453
版权归原作者 猪无戒_ 所有, 如有侵权,请联系我们删除。

“引入easyExcel后,导致springboot项目无法开启tomcat”的评论:

还没有评论