Reputation: 208
I am facing error at the time of export jasper report into pdf. That shows NoClassDefFoundError. I tried somany things like added recent itextPdf jar and itext jar. Then i moved those file into ext sub folder of lib. but, i have no luck can any one tell me, what was the problem?
This is my code:
JasperPrint jprint = (JasperPrint) JasperFillManager.fillReport(jasperFileName, param, conn);
JasperExportManager.exportReportToPdfFile(jprint, pdfFileName); //exportReportToPdf(jprint);
JasperViewer.viewReport(jprint);
Here my Problem:
Exception in thread "AWT-EventQueue-0" java.lang.NoClassDefFoundError: com/lowagie/text/DocumentException
Upvotes: 2
Views: 4012
Reputation: 842
JasperReports library is using customized version of itext 2.1.7. You'll have to use this version because itext is not compatilble between versions 2.x and 5.x.
Upvotes: 0
Reputation: 121
There are at least two good ways to solve this and possible similar problems:
Upvotes: 1
Reputation: 69440
you miss the itext.jar
in your classpath. Download and add it, so the exception will gone.
Upvotes: 1