データベース接続オブジェクトをjasperレポートに渡す必要があります
JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
parameterMap, connection);
output = new FileOutputStream(new File(reportPath + ".pdf"));
JasperExportManager.exportReportToPdfStream(jasperPrint, output);
JBoss JNDI データソースを使用すると、次の例外がスローされる問題
com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-913, SQLSTATE=57033, SQLERRMC=00C9008E;00000302;TLINEUPS.LUPPDSDV.X'000B27'
使用技術 DB2 9、Spring Batch、Jasper Report、JBoss EAP 6.4
以下のように接続しています
Connection conn = null;
try {
conn = transactionManager.getDataSource().getConnection();
} catch (SQLException e) {
logger.error(e.fillInStackTrace());
}
あらかじめご了承ください。