Clarity - Unable to fetch a Jaspersoft report with "Internal Server Error" due to 500 maximum pages limit
book
Article ID: 137130
calendar_today
Updated On:
Products
Clarity PPM SaaSClarity PPM On Premise
Issue/Introduction
Getting an Internal Server Error in an Adhoc view/ Jaspersoft report in Advanced Reporting/Jaspersoft in Clarity
Error in Jasperserver.log:
ERROR JRFillSubreport,pool-6-thread-957:879 [.....|....] - Fill 1: exception
net.sf.jasperreports.governors.MaxPagesGovernorException: Report "..." exceeded the limit of 500 maximum pages.
at net.sf.jasperreports.governors.MaxPagesGovernor.afterPageInit(MaxPagesGovernor.java:87)
Environment
Release : All Supported releases
Cause
As per the message in the Jasperserver.log, this is due to attempting to run a report with more than the allowed page limit for reports.
When you have a non-scheduler instance in a clustered environment (standalone node), the maximum number of pages, by default, that can appear on the user interface is limited to 500 pages. When the limit is exceeded, you receive an error.
Resolution
Run the report setting parameters to reduce the number of pages below the limit.
The page limit can be increased (not recommended due to performance impacts - proceed with caution) as described here: Increase Jasper Report Page Limit
Another possibility is to add a Scheduler Node in Jaspersoft cluster and use it for scheduling the large reports with maximum of 1000 pages. (View in UI up to 500 pages, Schedule 500-1000 pages)
For custom reports, one way to avoid this issue is to make a parameter mandatory (i.e. to select just one project rather than all of them).
The maximum number of report pages that you can generate is 500 pages for both scheduled and unscheduled reports. The limit applies to all reports and ad-hoc views that are exported using paginated options such as Excel (Paginated) and XLSX (Paginated). The limit is not applicable to the ad-hoc views exported using non-paginated export options such as Excel and XLSX. The following image shows the export options that have a limit to the maximum number of pages that are exported. this is working as expected, as the limit has been reached for the maximum amount of pages.