Caused by: java.lang.NoClassDefFoundError: org/apache/poi/POIXMLDocumentPart
时间: 2023-11-14 20:31:20 浏览: 224
This error indicates that the Java program is trying to use a class named POIXMLDocumentPart from the Apache POI library, but it cannot find the class at runtime. This can happen if the library is not included in the classpath or if there is a version mismatch between the library and the program. To resolve this error, make sure that the Apache POI library is included in the classpath and that it is the correct version for the program.
相关问题
Caused by: java.lang.NoClassDeffoundError: org/apache/poi/POIXMLTypeLoader
这个错误通常是因为ooxml-schemas版本过低导致的。在poi 4.1.0和4.1.2中,应该使用ooxml-schemas-1.4.jar而不再直接依赖org.apache.poi.*。这是因为poi升级后对很多内部的定西做了修改,所以很多问题都是版本不一致导致的。如果你遇到了这个问题,可以尝试升级ooxml-schemas版本或者使用poi官方推荐的版本组合。
easyexcel Caused by: java.lang.NoClassDefFoundError: org/apache/poi/POIXMLTypeLoader
这个错误通常是由于缺少POI相关的jar包引起的。你需要在你的项目中添加POI的相关jar包,并且确保它们的版本兼容。你可以在Maven中添加以下依赖来解决此问题:
```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>
```
如果你已经添加了这些依赖,那么请检查一下你的项目中是否有其他版本不兼容的POI jar包,可以尝试升级或降级相关的jar包版本,以解决此问题。
阅读全文