GWT Spring Jasper Reports Problems

Hello, I have an application built in GWT and Spring. I am trying to generate Jasper Reports on the server side. However when I execute the functionality, it hangs/stops at jasperDesign = JRXmlLoader.load(file_name); and does not respond or throw an exception. This means that my RPC call that triggers the report generation function does not return a response either (so the application hangs). However when I run the function in a normal java application it generates a report without any problem. What could be the issue? I am using JasperReports version 5.6.0. My java function:

public StandardServerResponse printReport(List<Object> items) {
        StandardServerResponse response = new StandardServerResponse();
        String file_name = null;
        Map<String, Object> parameters;
        JasperDesign jasperDesign;
        JasperReport jasperReport;
        JasperPrint jasperPrint;
        try {
            for (Object  obj: items) {
                parameters = new HashMap<String, Object>();
                parameters.put("id_in", obj.getId());
                file_name = "G:\\myreport.jrxml";
                jasperDesign = JRXmlLoader.load(file_name); //application stops here
                jasperReport = JasperCompileManager.compileReport(jasperDesign);
                jasperPrint = JasperFillManager.fillReport(jasperReport,  parameters, dataSource.getConnection());
                JasperExportManager.exportReportToPdfFile(jasperPrint,  "G:\\report.pdf");
        } catch (Exception ex) {
        return response;
mariahatie's picture
Joined: Aug 18 2014 - 12:24am
Last seen: 8 years 9 months ago

Please help...anyone please?

mariahatie - 8 years 9 months ago

0 Answers:

No answers yet