Jasper reports Jasper报告未导出报告

Jasper reports Jasper报告未导出报告,jasper-reports,Jasper Reports,我的代码没有抛出任何异常,也没有生成报告,代码中有任何问题吗 Connection con = getConnection(); HashMap<String,Object> param = new HashMap<String,Object>(); try { param.put("order_id", 202); InputStream employeeReportStream = getClass().

我的代码没有抛出任何异常,也没有生成报告,代码中有任何问题吗

Connection con = getConnection();
        HashMap<String,Object> param = new HashMap<String,Object>();
        try {
        param.put("order_id", 202);
        InputStream employeeReportStream = getClass().getResourceAsStream("/Invoice.jrxml");

        JasperReport jasperReport = JasperCompileManager.compileReport(employeeReportStream);

        JasperPrint jasperPrint=JasperFillManager.fillReport(jasperReport , param,con);


        JRExporter exporter = new JRPdfExporter();
        exporter.setParameter(JRExporterParameter.JASPER_PRINT, jasperPrint);
        exporter.setParameter(JRExporterParameter.OUTPUT_STREAM, new FileOutputStream("report.pdf")); 

        exporter.exportReport();

        System.out.println("done printing");

    }catch(Exception e) {
            e.printStackTrace();
        }finally {
            if (con != null) {
                try { con.close(); } catch (Exception e) {}
            }
        }
Connection con=getConnection();
HashMap param=新的HashMap();
试一试{
参数put(“订单id”,202);
InputStream employeeReportStream=getClass().getResourceAsStream(“/Invoice.jrxml”);
JasperReport-JasperReport=JasperCompileManager.compileReport(employeeReportStream);
JasperPrint JasperPrint=JasperFillManager.fillReport(jaspereport,param,con);
jreporter=新的JRPdfExporter();
exporter.setParameter(jreporterParameter.JASPER_PRINT,jasperPrint);
exporter.setParameter(jreporterParameter.OUTPUT_STREAM,新文件outputstream(“report.pdf”);
出口商。出口报告();
System.out.println(“完成打印”);
}捕获(例外e){
e、 printStackTrace();
}最后{
如果(con!=null){
尝试{con.close();}捕获(异常e){}
}
}
这是我的输出

正在加载类
com.mysql.jdbc.Driver'。这是不赞成的。新的驱动程序类是
com.mysql.cj.jdbc.driver'。驱动程序通过SPI自动注册,通常不需要手动加载驱动程序类。
打印完毕

将数据库连接的jdbc驱动程序类名,
com.mysql.jdbc.driver
更改为
com.mysql.cj.jdbc.driver
报告未生成
-这意味着什么?exportReport()生成报告并将其保存在磁盘上。