[#11616] - Jasperreports library with Open JDK 1.8 not working

Bug report
Feedback Requested
Project: Severity:
Component: Reproducibility:
Assigned to:

Hi Team,
I see a problem while generating the reports with Open JDK 1.8, the same works fine with Oracle JDK. The error observed is:

19 03-01 00:07:54.539[26217] Caused by: net.sf.jasperreports.governors.MaxPagesGovernorException: Report 'AIC_CAS_REPORT_SH_CSV_V4' exceeded the limit of 200000 maximum pages.
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.governors.MaxPagesGovernor.afterPageInit(MaxPagesGovernor.java:71)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRFillDatasetScriptlet.afterPageInit(JRFillDatasetScriptlet.java:115)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.JRAbstractScriptlet.callAfterPageInit(JRAbstractScriptlet.java:208)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillPageBreak(JRVerticalFiller.java:1914)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBreak(JRVerticalFiller.java:1950)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillColumnBand(JRVerticalFiller.java:2058)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillDetail(JRVerticalFiller.java:757)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReportStart(JRVerticalFiller.java:269)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRVerticalFiller.fillReport(JRVerticalFiller.java:127)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:942)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:860)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.fill.JRFiller.fillReport(JRFiller.java:84)
19 03-01 00:07:54.539[26217] at net.sf.jasperreports.engine.JasperFillManager.fillReport(JasperFillManager.java:624)
19 03-01 00:07:54.539[26217] at com.opentext.bn.rs.js.jasper.ReportTemplate.executeReport(ReportTemplate.java:377)

Please let me know if we can do something to make it work with Open JDK 1.8, as we cannot upgrade to higher versions of Jasper Reports Library, as our jrxml templates will not work with latest version of Jasper Library.

Ravi Gharshi

Binary Data aic_cas_report_sh_csv_v4.jrxml108.46 KB
jasper library
ravigharshi's picture
Joined: May 29 2015 - 12:17am
Last seen: 2 months 1 week ago


  • Status:New» Feedback Requested
  • Assigned:nobody» teodord


The fact that the max pages governor limit was exceeded probably means your report enters an infinite loop trying to create new pages in the hope that the content will fit the next page.
There is probably a text field that overflows onto a new page, where some other elements need to be reprinted because of their isPrintWhenDetailOverflows=true, which in turn causes the text field to start too low and do not fit again, causing a new page break and again and again and again...

The difference in behaviour between the two versions of JDK is probably coming from the default fonts that are used, in case a font mentioned in the report is not found.
Your report seems to be using Arial, but do you actually have Arial installed on the machine or do you make it available using a JR font extension?
In case the font does not exist, it is replaced with some default font that has different metrics and causes text to fit differently, triggering page breaks in a different way, hence the difference in behaviour.

I suggest you first try to verify you need the isPrintWhenDetailOverflows="true", which is usually the main cause for infinite loops.

I also suggest you try to upgrade, as I'm not sure why your report would not work on newer versions of our library. There are tools which can help you automate upgrade of JRXML templates, in case you actually need that.

I hope this helps.


I have placed all the required fonts in jre/lib/fonts directory for both Oracle JDK and Open JDK. The problem comes only with Open JDK.


When I remove the fonts from jre/lib/fonts I see this error
Caused by: net.sf.jasperreports.engine.util.JRFontNotFoundException: Font 'Arial' is not available to the JVM. See the Javadoc for more details.


FYI, I'm using OpenJDK 1.8 and haven't encountered this problem. OpenJDK does not contain all the fonts included in Oracle JDK. They just have to be manually included.


@hozawa, how did you include the fonts manually ?