0

I got these error message while click the export button in the sever. I can't convert that table.

I used primeface 5.0 and netbeans 8.0.2 version and GlassFish server 4.1

How can i solve this problem?

This is my home.xhtml file.

<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:p="http://primefaces.org/ui">


    <h:head>
        <title>Facelet Title</title>
    </h:head>

    <h:body>
        <h:form>
            <p:dataTable value="#{linkController.links}" var="lis" rowKey="#{lis.link_id}" selectionMode="single" id="tbl">

                <p:column headerText="Id">
                    <f:facet name="header"></f:facet>
                    #{lis.link_id}
                </p:column>

                <p:column headerText="name">
                    #{lis.link_name}
                </p:column>

                <p:column headerText="date">
                    #{lis.date}
                </p:column>

                <p:column headerText="time">
                    #{lis.time}
                </p:column>

                <p:column headerText="uplink">
                    #{lis.upLink}
                </p:column>

                <p:column headerText="downlink">
                    #{lis.downLink}
                </p:column>

            </p:dataTable>

            <p:commandButton value="Save as excel"> 
                <p:dataExporter type="xls" target="tbl" fileName="kananee" pageOnly="true" />
            </p:commandButton>
        </h:form>  



    </h:body>


</html>
  • This is the error .. SEVERE: java.lang.NoClassDefFoundError: org/apache/poi/ss/usermodel/RichTextString at org.primefaces.component.export.ExporterFactory.getExporterForType(ExporterFactory.java:30) at org.primefaces.component.export.DataExporter.processAction(DataExporter.java:88) – Thiruchelvan Kananeesan Jun 08 '15 at 03:54

1 Answers1

0

The error is self-explanatory, and confirmed in the Primefaces manual:

For pdf exporting itext and for xls exporting poi libraries are required in the classpath.

So here you go: https://poi.apache.org/download.html

Zim
  • 1,457
  • 1
  • 10
  • 21