p:dataExporter throws java.lang.NoClassDefFoundError: com/lowagie/text/phrase

itext, jsf, primefaces

Solution

Try iText 2.1.7 not 5.2.1. http://olex.openlogic.com/packages/itext/2.1.7

I think there are licence conflicts. So primefaces uses 2.1.7

For Excel Export you need Apache POI. Try 3.7: http://archive.apache.org/dist/poi/release/bin/

Edit

(you need only the `poi-3.7*.jar` and `poi-ooxml-3.7*.jar`)

Problem

I tried to use the data exporter control of PrimeFaces 3.2. Following is the code: ``` <p:commandLink value="export" ajax="false"> <p:dataExporter type="xls" target="dtable" fileName="myfile" /> </p:commandLink> <p:datatable id="dtable" .../> ``` When I click on export link, I get the following error: ``` java.lang.NoClassDefFoundError: com/lowagie/text/phrase ``` I downloaded itext jar 5.2.1 and included it in my application, still I get the same error. How do I solve it?

Original source