这个错误提示通常是由于缺少Apache POI库的依赖或者版本不兼容引起的。可以尝试以下几个解决方案:

  1. 确保在项目中添加了Apache POI库的依赖,可以在pom.xml文件中添加以下代码:
<dependency>
   <groupId>org.apache.poi</groupId>
   <artifactId>poi</artifactId>
   <version>4.1.2</version>
</dependency>
<dependency>
   <groupId>org.apache.poi</groupId>
   <artifactId>poi-ooxml</artifactId>
   <version>4.1.2</version>
</dependency>
  1. 如果已经添加了依赖,可以尝试更新版本号。

  2. 如果以上方法都无效,可以尝试删除项目中的.m2目录,然后重新构建项目。

如果问题仍然存在,可以尝试搜索相关的论坛或者社区,或者联系相关的技术支持团队。

解决jxls错误:Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.apache.poi.ooxml.POIXMLTypeLoader

原文地址: https://www.cveoy.top/t/topic/nTGu 著作权归作者所有。请勿转载和采集!

免费AI点我,无需注册和登录