p:dataExporter throws java.lang.NoClassDefFoundError: com/lowagie/text/phrase
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
)
z22
SOreadytohelp Apart from being a full time mobile app developer professionally, I believe in giving it back to the community and StackOverflow provides me this great platform to achieve it. I started with stack few years back when I was a high school student and since then I have been a regular user of stack. I got a chance to communicate with some experts on stack and all my questions were answered in few minutes which otherwise would have taken n number of hours. Not only that but I got an opportunity to solve so many questions of other users. Each upvote that I got was an award for me- I really feel satisfied every time when my answer/question helps others. Thanks a ton stack!
Updated on June 04, 2022Comments
-
z22 about 2 years
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?