行业知识
java.lang.NoSuchMethodError
错误一:java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.setCellValue(Ljava/time/LocalDateTime;)
WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by org.apache.poi.openxml4j.util.ZipSecureFile$1 (file:/D:/Program%20Files%20(x86)/apache-maven-3.6.1/mvn_repo/org/apache/poi/poi-ooxml/3.16/poi-ooxml-3.16.jar) to field java.io.FilterInputStream.in
WARNING: Please consider reporting this to the maintainers of org.apache.poi.openxml4j.util.ZipSecureFile$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
2023-07-07 21:42:02.599 ERROR 26060 — [nio-8080-exec-1] c.h.m.exception.SkyGlobalException : java.lang.NoSuchMethodError: org.apache.poi.ss.usermodel.Cell.getCellType()Lorg/apache/poi/ss/usermodel/CellType;
分析:报错信息有提到“org.apache.poi”,是poi与easyexcel产生了冲突;
解决方法:
去掉以下pom依赖
错误二:Resource of path [static/template/2023-07-07.xlsx] not exist!
查询数据后,保存到服务器上的文件是好的,有数据的,但在客户端下载下来的表格是错误的。
解决方法:模板文件名或者文件路径有中文,把中文去掉,文件名改为英文的
下一篇:三星手机云服务器