Jump to content
Changes to the Jaspersoft community edition download ×

org.xml.sax.SAXParseException - Help!


2005 IR Help

Recommended Posts

By: ben - hootonbs

org.xml.sax.SAXParseException - Help!

2004-06-27 23:57

Hi, I am tearing my hair out here - can anyone tell me why I am getting the following error when I try to compile an xml file using:

 

JasperCompileManager.compileReportToFile(context.getRealPath("/reports/junk.jrxml"));

 

The error is:

 

org.xml.sax.SAXParseException: URI was not reported to parser for entity [document]

at gnu.xml.aelfred2.SAXDriver.warn(SAXDriver.java:934)

at gnu.xml.aelfred2.SAXDriver.startExternalEntity(SAXDriver.java:631)

at gnu.xml.aelfred2.XmlParser.pushURL(XmlParser.java:3358)

at gnu.xml.aelfred2.XmlParser.doParse(XmlParser.java:159)

at gnu.xml.aelfred2.SAXDriver.parse(SAXDriver.java:320)

at gnu.xml.aelfred2.XmlReader.parse(XmlReader.java:294)

at org.apache.commons.digester.Digester.parse(Digester.java:1514)

at dori.jasper.engine.xml.JRXmlLoader.loadXML(JRXmlLoader.java:400)

... 30 more

 

My xml file looks 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>

.

.

.

</jasperReport>

 

 

 

 

 

By: ben - hootonbs

RE: org.xml.sax.SAXParseException - Help!

2004-06-28 01:11

thanks for the advice, but it still isn't working! I thought .jasper was the output file? I must be way off track...

 

 

 

 

By: Javed Momin - javedmomin

RE: org.xml.sax.SAXParseException - Help!

2004-06-28 00:05

Hi

You can compile only .xml file .jrxml is output file

 

JasperCompileManager.compileReportToFile(context.getRealPath("/reports/junk.jrxml"));

 

try this

 

JasperCompileManager.compileReportToFile(context.getRealPath("/reports/junk.xml"));

 

javed

 

 

 

 

 

By: Chuck Deal - cdeal

RE: org.xml.sax.SAXParseException - Help!

2004-06-28 05:18

This statement is INCORRECT!

 

your report definitions are written in XML and can have the extension *.xml or *.jrxml. *.jrxml has been adopted as the new standard extension.

 

A compiled definition (*.jrxml) becomes a *.jasper

 

 

 

 

By: ben - hootonbs

RE: org.xml.sax.SAXParseException - Help!

2004-06-29 17:57

Ok, now that we have the file extensions sorted, any suggestions for the original problem - the 'URI was not reported to parser for entity [document]' exception? I've seen various other queries on this problem, but no answers!

 

Thanks,

 

Ben.

 

 

 

 

By: Leo Tai - hkleo

RE: org.xml.sax.SAXParseException - Help!

2004-06-29 18:42

Sorry! I don't know what is the cause of your problem. But I think you can get around it.

 

1. Did you try to use another JAXP SAX Parser?

2. Do you have to compile the report on the web? If not, you can use the compiled .jasper file directly.

 

Hope this helps!

 

Cheers,

Leo Tai

 

 

 

 

By: Quinten Miller - quinten

RE: org.xml.sax.SAXParseException - Help!

2004-11-02 17:00

 

I managed to over come this problem by removing all references to gnujaxp on my PC and changing to a different SAX parser.

 

I set the system properties to change the SAX Parser

 

System.setProperty("javax.xml.parsers.SAXParserFactory",

"org.apache.xerces.jaxp.SAXParserFactoryImpl");

 

Cheers

Quinten

Link to comment
Share on other sites

  • Replies 0
  • Created
  • Last Reply

Top Posters In This Topic

Popular Days

Top Posters In This Topic

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...