Jump to content

Recommended Posts

Posted

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.

 

  • Replies 2
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

  • 1 month later...
Posted

I got the same problem on newer version 5.6.0

net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data.

Would appreciate any advice or suggestions Thank you.

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...