[英]java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/RichTextString at org.primefaces.component.export.ExporterFactory.getExporterForType
I used the same sample code Primefaces has in its web page: 我在其网页中使用了相同的示例代码Primefaces:
<h:commandLink value="Excel">
<p:dataExporter type="xls" target="dataTable" fileName="boo" pageOnly="true"/>
</h:commandLink>
But does not work. 但是不起作用。 In Internet Explorer browser gives the following message:
在Internet Explorer中,浏览器给出以下消息:
Details of the errors of the web page Message: Unexpected call to method or property access.
网页错误的详细信息消息:意外调用方法或属性。
Nothing ever happens in Mozilla Firefox. Mozilla Firefox中什么都没有发生。
What might be happening? 可能会发生什么?
javax.servlet.ServletException: org/apache/poi/ss/usermodel/RichTextString
Look further down in the stacktrace. 在堆栈跟踪中往下看。 I bet that the root cause is either a
NoClassDefFoundError
or ClassNotFoundException
? 我敢打赌根本原因是
NoClassDefFoundError
或ClassNotFoundException
吗? In that case, this just means that you forgot to install Apache POI . 在这种情况下,这仅意味着您忘记安装Apache POI 。
Download this Apache POI zip file , extract it, put poi-3.8-20120326.jar in /WEB-INF/lib
folder and rebuild/redeploy/restart the webapp. 下载此Apache POI zip文件 ,将其解压缩,将poi-3.8-20120326.jar放在
/WEB-INF/lib
文件夹中,然后重新构建 /重新部署/重新启动/WEB-INF/lib
应用程序。
Try to to put this jar file.I show the link,because i solved this problem. 尝试放入这个jar文件。我显示了链接,因为我解决了这个问题。
http://apache.mirrors.pair.com/poi/release/bin/poi-bin-3.9-20121203.zip http://apache.mirrors.pair.com/poi/release/bin/poi-bin-3.9-20121203.zip
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.