java.lang.NoClassDefFoundError: net.sf.jasperreports.engine.util.JRStyledTextParser (initialization failure)

0

Hi All,

My Web-Application module lets a user to download a report in PDF format. Below error is intermittently coming while PDF downloading.

java.lang.NoClassDefFoundError: net.sf.jasperreports.engine.util.JRStyledTextParser (initialization failure)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:176)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153)
    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:82)
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
    at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:542)
    at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:522)
    at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:888)
 

Caused by: net.sf.jasperreports.engine.JRRuntimeException: java.io.IOException: Problem reading font data.
    at net.sf.jasperreports.engine.fonts.SimpleFontFace.<init>(SimpleFontFace.java:108)
    at net.sf.jasperreports.engine.fonts.SimpleFontFace.<init>(SimpleFontFace.java:128)
    at net.sf.jasperreports.engine.fonts.SimpleFontFace.getInstance(SimpleFontFace.java:67)
    at net.sf.jasperreports.engine.fonts.SimpleFontFamily.setNormal(SimpleFontFamily.java:99)
    at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamily(SimpleFontExtensionHelper.java:261)
    at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.parseFontFamilies(SimpleFontExtensionHelper.java:232)
    at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:193)
    at net.sf.jasperreports.engine.fonts.SimpleFontExtensionHelper.loadFontFamilies(SimpleFontExtensionHelper.java:162)
    at net.sf.jasperreports.engine.fonts.FontExtensionsRegistry.getExtensions(FontExtensionsRegistry.java:56)
    at net.sf.jasperreports.extensions.DefaultExtensionsRegistry.getExtensions(DefaultExtensionsRegistry.java:110)
    at net.sf.jasperreports.engine.util.JRStyledTextParser.<clinit>(JRStyledTextParser.java:83)
    at java.lang.J9VMInternals.initializeImpl(Native Method)
    at java.lang.J9VMInternals.initialize(J9VMInternals.java:236)
    at net.sf.jasperreports.engine.fill.JRBaseFiller.<init>(JRBaseFiller.java:121)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:88)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:103)
    at net.sf.jasperreports.engine.fill.JRVerticalFiller.<init>(JRVerticalFiller.java:61)
    at net.sf.jasperreports.engine.fill.JRFiller.createFiller(JRFiller.java:153)
    at net.sf.jasperreports.engine.fill.JRFiller.fill(JRFiller.java:82)
    at net.sf.jasperreports.engine.JasperFillManager.fill(JasperFillManager.java:653)
    at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:542)
    at net.sf.jasperreports.engine.JasperFillManager.fillToFile(JasperFillManager.java:522)
    at net.sf.jasperreports.engine.JasperFillManager.fillReportToFile(JasperFillManager.java:888)

As suggested in many forms I checked system properties ,  and property java.awt.headless=true  is already present.

The module is deployed on 4 servers, and this issue is intermittently coming on only two servers. When this error is encountered we bounce the respective server a couple of times and the issue gets sorted for some time. But  after some time this issue agains starts  coming .

Kindly advise on some solution to this issue.

 

divya.dhyani84's picture
Joined: Mar 28 2014 - 2:58am
Last seen: 1 year 4 months ago

1 Answer:

0

The error messages seems to suggest that you're not using a standard font and you haven't added font extension to your class path.

Stick to using only "SansSerif" font in your report.

 

hozawa's picture
45139
Joined: Apr 24 2010 - 4:31pm
Last seen: 1 month 1 week ago
Feedback