jsf - java.lang.NoClassDefFoundError : org/apache/poi/ss/usermodel/RichTextString at org. primefaces.component.export.ExporterFactory.getExporterForType

标签 jsf primefaces datatable export-to-excel data-export

我使用了 Primefaces 在其网页中的相同示例代码:

<h:commandLink value="Excel">                     
  <p:dataExporter type="xls" target="dataTable" fileName="boo" pageOnly="true"/>  
</h:commandLink>

但是不起作用。 在 Internet Explorer 浏览器中显示以下消息:

Details of the errors of the web page Message: Unexpected call to method or property access.

Mozilla Firefox 中什么也没发生。

可能会发生什么?

最佳答案

javax.servlet.ServletException: org/apache/poi/ss/usermodel/RichTextString

在堆栈跟踪中进一步查看。我敢打赌,根本原因是 NoClassDefFoundErrorClassNotFoundException?在这种情况下,这仅意味着您忘记安装 Apache POI

下载this Apache POI zip file ,解压它,将 poi-3.8-20120326.jar 放入 /WEB-INF/lib 文件夹中并重建/重新部署/重新启动 web 应用程序。

关于jsf - java.lang.NoClassDefFoundError : org/apache/poi/ss/usermodel/RichTextString at org. primefaces.component.export.ExporterFactory.getExporterForType,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/13293433/

相关文章:

javascript - jquery 数据表禁用特定行中的排序

java - Web 应用实用程序类

jsf - java.lang.IllegalStateException:找不到工厂javax.faces.application.ApplicationFactory的备份

java - <p :selectOneMenu listener method returns null when a value is selected

eclipse - JSF:在 Eclipse 中增加 Tomcat 7 的日志记录级别?

java - 重新部署后使用 JSF 2 防止 ViewExpiredException

jsf - 如何在p :fileDownload to Download Non class path File中使用流式内容

jsf-2 - PrimeFaces dataTable滚动条在所需位置

c# - DataTable.Select 字符串函数在 where 子句中

asp.net - LINQ to DataTable 简单快速