Reports are failing with the below error messages. This is typically seen with custom reports in Advanced reporting.
"net.sf.jasperreports.engine.JRException: Unable to get next record" and "java.sql.SQLRecoverableException: Closed Connection: next"
The Jaspersoft Catalina log shows an "org.apache.tomcat.jdbc.pool.ConnectionPool abandon" message.
Release: Any
Component: Clarity Jaspersoft
The errors are related to Tomcat understanding that the connection was abandoned. This can happen if the query is returning a massive amount of records in a time frame that is longer than what is configured in tomcat as the "abandoned timeout".
It's best to optimize the query.
Changes to parameters are not suggested, but are noted below for On Premise customers as an alternative:
(<JasperSoft>/webapps/reportservice/WEB-INF)
<bean id="dwhTntPoolProperties" class="org.apache.tomcat.jdbc.pool.PoolProperties" scope="prototype">
....
<property name="removeAbandonedTimeout" value="12000"/>
Change from 900 to 12000 as shown below:
<bean id="ppmTntPoolProperties" class="org.apache.tomcat.jdbc.pool.PoolProperties" scope="prototype">
....
<property name="removeAbandonedTimeout" value="12000"/>
Note: removeAbandonedTimeout - (int) Timeout in seconds before an abandoned(in use) connection can be removed.
The default value is 900 (900 seconds). The value should be set to the longest-running query your reports might have.
Restart the Jaspersoft Tomcat service after making this change.