JasperFillManager fails to create output

I'm trying to upgrade from Jasper Reports 5.5.1 to 6.0 but I can't get any output.  I'm running a standalone java application using compiled jrxml files.

I'm pretty sure it's a library I'm missing but I've gone through the documentation and I have all of the required libraries, so I'm not sure how to troubleshoot this further.

Also the program (at least in netbeans) runs through code in an unexpected fashion that I also can't figure out.

First here are the libraries that are included in the project.
List of librariesHere is the sample code where it fails.
    public static JasperPrint fillReport(String filename, JRParDataSource jrds,
            HashMap<String, Object> parameters) throws JRException {

     JasperPrint jasperPrint = null;
     jasperPrint = JasperFillManager.fillReport(filename, parameters,
       return jasperPrint;

Open in new window

The program runs the fillReport line but never hits the return jasperPrint line.

Here is the calling routine

    public static void saveJasperPrint(String jasperPath, String jasperFilename,
            String filename, HashMap<String, Object> parameters, JRParDataSource jrds)
            throws JRException {
        jasperPath = FileEx.makePathname(jasperPath, jasperFilename, true);
        jasperPath += ".jasper";

        // create jasperPrint
        JasperPrint jasperPrint = null;
        jasperPrint = fillReport(jasperPath, jrds, parameters);
        // save report
        saveReport(jasperPrint, new File(filename));

Open in new window

After calling fillReport it never returns to run saveReport

And finally the top level caller.
try {   //other code in here
    for (nDone=0; nDone< nTotal; nDone++) {  
             try {
                    // Add current user id to filename to prevent getting
                    // mixed up with someone else's report.
                            criteria.getFilename() + "." + user, parameters, jrds);
                } catch (JRException e) {
                    errors.add(BusinessConstants.dataCentreName + ": Unable to create jasperPrint for " +
        catch (Exception e) {
            errors.add(e.getMessage() + "\n" + Trace.printTrace(e));
        } finally {
            return errors.isEmpty() ? null : errors;

Open in new window

The call to saveJasperPrint happens and the return goes directly to the finally statement without being caught in any of the exception handlers.  

So I'm not sure how to resolve this problem.
Who is Participating?
geekdad1Connect With a Mentor Author Commented:
Closing this as it's too old.
The program runs the fillReport line but never hits the return jasperPrint line.

How do you know that?
geekdad1Author Commented:
Running in debug mode under netbeans 7.0  I reach the breakpoint at  fillReport but single stepping from that statement goes right to the finally statement in the top level calling program.
Keep up with what's happening at Experts Exchange!

Sign up to receive Decoded, a new monthly digest with product updates, feature release info, continuing education opportunities, and more.

Well from what I see of the API for this, the JasperFillManager.fillReport() methods with 3 args seem to take the Map params as the last argument - maybe you want to check this, iianm. But I could be wrong as I don't do Jasper.
geekdad1Author Commented:
This is a working application (at least it was until I tried to upgrade jasper), so I'm quite sure the arguments to the function are fine.
geekdad1Author Commented:
Moved on to other problems.  No longer an issue
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.