我需要将数据库连接对象传递给碧玉报告
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());
}
提前感谢您的帮助。