EasyPoi导出word表格报 org/openxmlformats/schemas/wordprocessingml/x2006/main/DocumentDocument$Factory问题解决
问题:使用easypoi导出word文档,word里有表格数据,一直报:org.springframework.web.util.NestedServletException: Handler dispatch failed;缺少这个依赖或jar:ooxml-schemas。
·
问题:使用easypoi导出word文档,word里有表格数据,一直报:org.springframework.web.util.NestedServletException: Handler dispatch failed; nested exception is java.lang.NoClassDefFoundError: org/openxmlformats/schemas/wordprocessingml/x2006/main/Documen
tDocument$Factory
解决办法:
1、 第一种:
缺少这个依赖或jar:ooxml-schemas
Springboot项目的话,在pom.xml里加下面这个依赖。
<dependency>
<groupId>org.apache.poi</groupId>
<artifactId>ooxml-schemas</artifactId>
<version>1.4</version>
</dependency>
老项目需要jar的话,可以从这里下载:
2、第二种:
poi相关jar版本不一致的问题。 最好换成一致的。如下版本是可以的:

更多推荐




所有评论(0)