Parse error when compiling a JasperReport

C

CD1

Hi guys!

I'm trying to use JasperReports rather than JFreeReport, because
there's iReport and it makes the work easier for me :)

I made a basic report on iReport, compiled, ran and everything (under
iReport). When I try to run it under my program (the code will follow),
it doesn't work. Here's what happens:


try {
String FILE = "report.jrxml";
JasperReport report = JasperCompileManager.compileReport(FILE);
JasperPrint printed_report =
JasperFillManager.fillReport(report, null, someConnection);
JasperViewer.viewReport(printed_report);
}
catch (JRException excecao) {
System.out.println("Error: " + excecao.getMessage());
}

Error: Parse Warning at line 1 column 0: URI was not reported to parser
for entity [document]
org.xml.sax.SAXParseException: URI was not reported to parser for
entity [document]

The report starts like this:

<?xml version="1.0" encoding="UTF-8" ?>
<!-- Created with iReport - A designer for JasperReports -->
<!DOCTYPE jasperReport PUBLIC "//JasperReports//DTD Report Design//EN"
"http://jasperreports.sourceforge.net/dtds/jasperreport.dtd">
<jasperReport
..../>

What's wrong?? It compiles fine under iReport, but when I try, it
doesn't. The classpath is right (I think...): the
common-[beanutils|logging|digester|collections], itext... I think these
are the needed files.

Thanks for any help ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,764
Messages
2,569,565
Members
45,041
Latest member
RomeoFarnh

Latest Threads

Top