rajalapati Posted June 16, 2014 Posted June 16, 2014 Hi All,I keep on getting the following error while generating a pdf in linux server where as it's working fine in my local machine.java.lang.ExceptionInInitializerError at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:124) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:89) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:104) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:62) at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:179) at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:108)Caused by: net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data. at net.sf.jasperreports.engine.fonts.SimpleFontFace.setTtf(SimpleFontFace.java:182) at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFace(SimpleFontExtensionHelper.java:368) Caused by: java.io.IOException: Problem reading font data. at java.awt.Font.createFont0(Font.java:999) at java.awt.Font.createFont(Font.java:876) I have tried all the solutions that I could fine on the web like- Give permissions to temp directory of the tomcat- Set the java.awt.headless property to true- Add the jasper-fonts library to the lib folder and use only the "DejaVu Sans" font in all my reports.None of the solutions worked and now I need help from Jasper specialists. After I see this issue for the very first time while populating the pdf and second time onwards I am getting the following exception java.lang.NoClassDefFoundError: Could not initialize class net.sf.jasperreports.engine.util.JRStyledTextParser at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:124) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:89) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:104) at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:62) Any help would be much appreciated.. Thank you.
hozawa Posted June 17, 2014 Posted June 17, 2014 If you're using 5.5.0, there's a bug with using external fonts. Upgrade to 5.6.0
kermit18 Posted August 5, 2014 Posted August 5, 2014 I got the same problem on newer version 5.6.0net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data.Would appreciate any advice or suggestions Thank you.
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