我正在使用Apache poi来操作word 2007文档。我正在使用ooxml-shemas-1.0,但有以下消息:
Caused by: java.lang.NoSuchMethodError: org.openxmlformats.schemas.wordprocessingml.x2006.main.CTFootnotes.getFootnoteList()Ljava/util/List;
at org.apache.poi.xwpf.usermodel.XWPFFootnotes.onDocumentRead(XWPFFootnotes.java:84)
at org.apache.poi.xwpf.usermodel.XWPFDocument.initFootnotes(XWPFDocument.java:235)
at org.apache.poi.xwpf.usermodel.XWPFDocument.onDocumentRead(XWPFDocument.java:137)
at org.apache.poi.POIXMLDocument.load(POIXMLDocument.java:159)
at org.apache.poi.xwpf.usermodel.XWPFDocument.<init>(XWPFDocument.java:123)
at com.scientiweb.utils.WordDocumentProcessor.loadFromTemplate(WordDocumentProcessor.java:74)
我在poi-ooxmlshemas-3.8.jar中找到了我不再使用的方法,因为我用ooxml-shemas-1.0.jar(14 mb)替换它。在这种情况下我该怎么做?
答案 0 :(得分:3)
答案 1 :(得分:0)
Since POI 3.7 the ooxml-schemas-1.1.jar is needed you can download it from here http://repo1.maven.org/maven2/org/apache/poi/ooxml-schemas/1.1/ooxml-schemas-1.1-sources.jar