360SDN.COM

首页/Java/列表

java.lang.ClassNotFoundException: org.openxmlformats.schemas.wordprocessingml.x

来源:  2017-10-24 14:04:52    评论:0点击:

问题: java.lang.ClassNotFoundException: org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPIm 

在使用poi对office文档进行操作的时候,具体一点,就是在调用CTP.getBookmarkStartList()的时候,出现了一个异常,粘贴如下:


Exception in thread “main” java.lang.NoClassDefFoundError: org/openxmlformats/schemas/wordprocessingml/x2006/main/impl/CTPImpl1BookmarkStartListatorg.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPImpl.getBookmarkStartList(UnknownSource)atpac.ReportGenerator.handleParagraph(ReportGenerator.java:152)atpac.ReportGenerator.getUniqueData(ReportGenerator.java:129)atpac.ReportGenerator.main(ReportGenerator.java:62)Causedby:java.lang.ClassNotFoundException:org.openxmlformats.schemas.wordprocessingml.x2006.main.impl.CTPImpl1BookmarkStartList
at java.net.URLClassLoader1.run(UnknownSource)atjava.net.URLClassLoader1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)
at sun.misc.Launcher$AppClassLoader.loadClass(Unknown Source)
at java.lang.ClassLoader.loadClass(Unknown Source)

 

解决办法:需要添加poi-scratchpad-3.17.jar

或者使用maven,在pom.xml中添加


<dependency>
<groupId>org.apache.poi</groupId>
     <artifactId>poi-scratchpad</artifactId>
      <version>3.17</version>
</dependency>

为您推荐

友情链接 |九搜汽车网 |手机ok生活信息网|ok生活信息网|ok微生活
 Powered by www.360SDN.COM   京ICP备11022651号-4 © 2012-2016 版权