Caused by: net.sf.jasperreports.engine.JRException: Error preparing statement for executing the report query : SELECT O.name as orgname, LOC.ADDRESS1, LOC.POSTAL AS CP, LOC.CITY, CTY_TRL.NAME, U.PHONE, U.FAX, U.EMAIL, OI.TAXID AS CIF FROM AD_ORGINFO OI INNER JOIN AD_ORG O ON O.AD_ORG_ID=OI.AD_ORG_ID LEFT JOIN C_LOCATION LOC ON LOC.C_LOCATION_ID=OI.C_LOCATION_ID LEFT JOIN C_CITY CIT ON CIT.C_CITY_ID=LOC.C_CITY_ID LEFT JOIN C_COUNTRY CTY ON CTY.C_COUNTRY_ID=LOC.C_COUNTRY_ID LEFT JOIN C_COUNTRY_TRL CTY_TRL ON CTY_TRL.C_COUNTRY_ID=CTY.C_COUNTRY_ID AND CTY_TRL.AD_LANGUAGE='es_ES' LEFT JOIN AD_USER U ON U.AD_USER_ID=OI.AD_USER_ID WHERE O.AD_ORG_ID=? at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:377) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:196) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1119) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:691) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:434) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:508) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:393) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:704) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203) ~[jasperreports-6.0.0.jar:6.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?] ... 1 more Caused by: java.sql.SQLException: PooledConnection has already been closed. at org.apache.tomcat.jdbc.pool.DisposableConnectionFacade.invoke(DisposableConnectionFacade.java:87) ~[tomcat-jdbc.jar:?] at com.sun.proxy.$Proxy48.prepareStatement(Unknown Source) ~[?:?] at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createStatement(JRJdbcQueryExecuter.java:267) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.query.JRJdbcQueryExecuter.createDatasource(JRJdbcQueryExecuter.java:196) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRFillDataset.createQueryDatasource(JRFillDataset.java:1119) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRFillDataset.initDatasource(JRFillDataset.java:691) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.BaseReportFiller.setParameters(BaseReportFiller.java:434) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRBaseFiller.fill(JRBaseFiller.java:508) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.BaseReportFiller.fill(BaseReportFiller.java:393) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRFillSubreport.fillSubreport(JRFillSubreport.java:704) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.JRSubreportRunnable.run(JRSubreportRunnable.java:59) ~[jasperreports-6.0.0.jar:6.0.0] at net.sf.jasperreports.engine.fill.AbstractThreadSubreportRunner.run(AbstractThreadSubreportRunner.java:203) ~[jasperreports-6.0.0.jar:6.0.0] at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128) ~[?:?] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628) ~[?:?] ... 1 more