Everything wents fine until you hit the print button. At this point a
null pointer exception occured:

[2006-11-09 10:10:36 CET] <WorkerThread0> java.lang.NullPointerException
        at com.wocode.jasper.WCJRUtils.compileReport(WCJRUtils.java:40)
        at com.wocode.jasper.WCJRUtils.printReport(WCJRUtils.java:86)
        at Main.printReport(Main.java:45)
        at Main.printReport(Main.java:67)
...<snip>

I´ve filled the database with some movies, actors... so there is data
which can be printed. Any ideas what might happen?

Sorry it took so long to get back on this.

The problem is that it can't find your report file.

Here's the code:
URL reportURL =
app.resourceManager().pathURLForResourceNamed(reportName,
frameworkName, null);
return JasperCompileManager.compileReport(reportURL.getPath());

reportURL is null, because the call to
app.resourceManager().pathURLForResourceNamed() is failing.

This was triggered by this code:
        public static boolean printReport(String reportName, String
frameworkName, Map parameters, JRDataSource datasource,
                        String printerName) throws JRException, 
URISyntaxException
        {
                JasperPrint jasperPrint = null;
                if(reportName.endsWith("xml"))
                {
                        JasperReport report = compileReport(reportName, 
frameworkName);

so the reportName and frameworkName are not resulting in a file that
WebObjects can find. You may want to try some logging with
app.resourceManager().pathURLForResourceNamed(reportName, frameworkName, null);

for various of values of reportName and frameworkName (use null for
the frameworkName if it's in the application itself) to see where the
problem is.

HTH,
Logan
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to