easyexcel icon indicating copy to clipboard operation
easyexcel copied to clipboard

easyExcel读取大文件提示没有ehcache

Open lgbwust opened this issue 6 years ago • 2 comments

异常提示:java.lang.NoSuchMethodError: org.ehcache.config.builders.CacheManagerBuilder.persistence(Ljava/io/File;)Lorg/ehcache/config/builders/CacheManagerConfiguration;

读取一个20M,20万条记录的excel,提示上述错误,小文件可以正常读取,请问这个问题该怎么解决?谢谢!

lgbwust avatar Jan 13 '20 08:01 lgbwust

已解决,需要添加ehcache依赖

lgbwust avatar Jan 14 '20 01:01 lgbwust

默认使用的3.2.2版本 没有对用的方法

[INFO] +- com.alibaba:easyexcel:jar:2.2.6:compile
[INFO] |  +- cglib:cglib:jar:3.1:compile
[INFO] |  |  \- org.ow2.asm:asm:jar:4.2:compile
[INFO] |  \- org.ehcache:ehcache:jar:3.2.2:compile

需显式添加高版本的ehcache

<dependency>
    <groupId>org.ehcache</groupId>
    <artifactId>ehcache</artifactId>
    <version>3.8.1</version>
</dependency>

zhugw avatar Jul 31 '20 03:07 zhugw