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版本不一致的问题。 最好换成一致的。如下版本是可以的:

魔乐社区(Modelers.cn) 是一个中立、公益的人工智能社区,提供人工智能工具、模型、数据的托管、展示与应用协同服务,为人工智能开发及爱好者搭建开放的学习交流平台。社区通过理事会方式运作,由全产业链共同建设、共同运营、共同享有,推动国产AI生态繁荣发展。
更多推荐

所有评论(0)