1

I need to pass database connection object to jasper report as

JasperPrint jasperPrint = JasperFillManager.fillReport(jasperReport,
            parameterMap, connection);
output = new FileOutputStream(new File(reportPath + ".pdf"));
JasperExportManager.exportReportToPdfStream(jasperPrint, output);

The issue when i use JBoss JNDI datasource, it throwsfollowing exception

com.ibm.db2.jcc.am.SqlException: DB2 SQL Error: SQLCODE=-913, SQLSTATE=57033, SQLERRMC=00C9008E;00000302;TLINEUPS.LUPPDSDV.X'000B27'

Technology Used DB2 9, Spring Batch, Jasper Report, JBoss EAP 6.4

I am getting connection from as below

Connection conn = null;
    try {
        conn = transactionManager.getDataSource().getConnection();
    } catch (SQLException e) {
        logger.error(e.fillInStackTrace());
}

Appreciate your help in advance.

0 Answers0