manigandanms Posted November 5, 2009 Share Posted November 5, 2009 Hi,I am using Jasper 3.5.0 to generate pdf report. It works fine on windows xp but on the linux platform it throws an error while filling the report. Find below code snippet. swapFile = new JRSwapFile(REPORT_GENERATION_PATH, 2048, 2048); JRSwapFileVirtualizer virtualizer = new JRSwapFileVirtualizer(2, swapFile, true); parameters.put(JRParameter.REPORT_VIRTUALIZER, virtualizer);JasperPrint jasperPrint = JasperFillManager.fillReport(REPORT_TEMPLATE_PATH + reportFileNameWithoutExt + ".jasper", parameters, dataSource);Error Stack trace:java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:176) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:77) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:59) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:147) at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:83) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:628) at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:544)Thanks,Mani Link to comment Share on other sites More sharing options...
lucianc Posted December 3, 2009 Share Posted December 3, 2009 You need to run Java in headless AWT mode.Regards,Lucian 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