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

B

byoder

I was trying to figure out why I was getting the following exception
when I only added the JFreeReport JAR file to my classpath:

Caused by: 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 gnu.xml.dom.JAXPFactory$JAXPBuilder.parse(JAXPFactory.java:186)

Basically I had just added the JFree report JAR
(jfreereport-0.8.8-04.jar) to my classpath and that alone was giving
me errors whenever I was using the Properties.loadFromXML method.

ByteArrayInputStream in = new
ByteArrayInputStream(filterContent);
p.loadFromXML(in);

Then I came to find out that the jfreereport turns on the DTD
validation, whereas in Java 1.5.x it was turned off by default. While
I could have tried to set the proxy for DTD validation I decided to
turn DTD validation off by setting the following property.


In the file located at "org\jfree\report\modules\parser\base
\configuration.properties"

I set the following property (which was true by default)....

org.jfree.report.modules.parser.base.Validate=false


Then I was not getting the error anymore. I think that the folks at
JFree should consider turning DTD validation off by default - in
keeping with the Java 1.5 standards.
 

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,755
Messages
2,569,536
Members
45,013
Latest member
KatriceSwa

Latest Threads

Top