search cancel

Report fails to load with error "Could not load the following font" from Reports and Jobs

book

Article ID: 213463

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

A specific Jaspersoft report fails to load when you try to execute it from Reports and Jobs. Especially so when you try to load a particular section in the report. It loads/downloads correctly if that section is left out.

The following error is seen in the app-ca.log:

ERROR 2021-02-11 01:04:16,649 [http-nio-8080-exec-1836] niku.njs (clarity:admin:26716504__32610FCC-0219-4E59-8403-44214BA15CD2:nmc.executeAvailReport) Jasper error message:Job: V1_xxxxxxxx (ID: 19627716)
Report unit: /ca_ppm/reports/Custom_Reports/V1
Quartz Job: ReportJobs.job_19627716
Quartz Trigger: ReportJobs.trigger_19627714_0
 Error Message: The export to pdf was not completed. An error interrupted the process.
Exceptions:
net.sf.jasperreports.engine.JRRuntimeException: Could not load the following font: 
pdfFontName: calibrib.ttf
pdfEncoding: Identity-H
isPdfEmbedded : true
 at net.sf.jasperreports.engine.export.JRPdfExporter.getFont(JRPdfExporter.java:2340)
 at net.sf.jasperreports.engine.export.JRPdfExporter.getChunk(JRPdfExporter.java:2123)
 at net.sf.jasperreports.engine.export.JRPdfExporter.getPhrase(JRPdfExporter.java:2092)
 at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.getPhrase(SimplePdfTextRenderer.java:64)
 at net.sf.jasperreports.engine.export.SimplePdfTextRenderer.render(SimplePdfTextRenderer.java:73)

Cause

Mention of calibrib.ttf font type in some report components causes this issue.

Resolution

Use the Jaspersoft Studio to remove all instances of reference to this particular font, ideally through the XML file. Take precaution to test the report and not make changes to any other components.