chris_48 Posted April 5, 2016 Share Posted April 5, 2016 I have been getting NoClassDefFoundError for com.lowagie.text.DocumentException:Exception in thread "main" java.lang.NoClassDefFoundError: com/lowagie/text/DocumentExceptionat net.sf.jasperreports.engine.JasperExportManager.exportToPdfFile(JasperExportManager.java:151)at net.sf.jasperreports.engine.JasperExportManager.exportReportToPdfFile(JasperExportManager.java:504)at ca.polarisfinancial.JasperTest.Main.main(Main.java:28)I have itextpdf-5.5.9.jar on my classpath, but after digging into it a little bit I realized that some of the code distributed with 6.2.1 is pointing to the old package, for example:JRPdfExporter.java in net.sf.jasperreports.engine.export has the following import defined:import com.lowagie.text.DocumentException;instead ofimport com.itextpdf.text.DocumentException; Is that intentional? If so, what can I do to fix it? Link to comment Share on other sites More sharing options...
Solution hozawa Posted April 5, 2016 Solution Share Posted April 5, 2016 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. Link to comment Share on other sites More sharing options...
chris_48 Posted April 5, 2016 Author Share Posted April 5, 2016 Thanks hozawa, that was the issue. For anyone else having the same problem, the customized version referred to below is available at:http://jasperreports.sourceforge.net/maven2/com/lowagie/itext/2.1.7.js1/ Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now