PDA

View Full Version : The SAX xml parser used in JFreeReports...



Anonymous
07-23-2002, 07:03 AM
Hi,

Pls correct me I am wrong.
I downloaded the source for ver 0.7.5 and feel that the code is tightly couple with the SAX parser (gnujaxp.jar).

We use IBM Visual Age Java (VAJ) as an IDE and develop web applications based on the apache-jakarta STRUTS framework. For that in my workspace I already hv JAXP (Xerces compatible) parser.

But I cannot import the JFreeReport code sucessfully into VAJ as I do not hv the SAX Parser in my workspace. I fear adding the SAX parser into my workspace, as it may contradict with the JAXP parser.

Can't JFreeReports use JAXP or other developer/user defined xml parsers.

rgds
G1

Anonymous
07-23-2002, 07:54 AM
Hi,

you shall have no fear, as we don't use any tight binding to the Gnu-Parser. I also use Xerces for development, the only reason for the GnuParser is that it is much smaller than Xerces, so I include this one in the distribution files.

JFreeReport restricts its uses to the defined JAXP-Standard, the org.sax.* packages are defined in the standard and any JAXP compatible Parser will to the job.

You are using VAJ, so you cannot insert the same packages contained in different projects into your workspace/repository (at least in VAJ 3.5) . To solve your problem just ignore the Gnu-Parser and import all other packages into your workspace. It should work then.

Have more fun,
said Thomas

Anonymous
07-29-2002, 10:27 AM
Hi,

This may be a problem more specific to the Visual Age for Java IDE, but
stemmed from trying to
get JFreeReports imported into the IDE.

I use VAJ 3.5.3 which uses JDK 1.2.2 internally.
(though JFreeReports uses JDK 1.3, I am in the process of downgrading it to
jdk1.2.2)

I use the STRUTS (http://jakarta.apache.org/struts) framework in the
development of my web applications.
STRUTS requires the use of XML parsing and the IDE already has 2 parsers
(IBM XML parser and JAXP/ java xml parser) in it.
The gnu parser (gnujaxp.jar) also has a couple of packages that conflict
with these 2 parsers.

(to be specific:
org.xml.sax.helpers,
org.xml.sax,
org.w3c.dom and
javax.xml.parsers)

So I exported the 2 existing parsers in my IDE, to file and deleted them
from the IDE.
Then I exploded the GNUJAXP.jar and over writing the exported code.
And then imported the new merged XML parser classes back into the IDE (under
a new project)

Now when I start the WebSphereTest environment which loads up the STRUTS
servlets, I get the foll exception traces.

(I had to do this export - merge - reimport exercise as JFreeReports gives
lot of compilation errors with the original IBM xml and JAXP parsers)

Will appreciate any clues...

thks
G1

The Exception traces are:

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]
java.lang.Throwable(java.lang.String)
java.lang.Exception(java.lang.String)
org.xml.sax.SAXException(java.lang.String)
org.xml.sax.SAXParseException(java.lang.String, org.xml.sax.Locator)
void gnu.xml.aelfred2.SAXDriver.warn(java.lang.String)
void
gnu.xml.aelfred2.SAXDriver.startExternalEntity(java.lang.String,
java.lang.String, boolean)
void gnu.xml.aelfred2.XmlParser.pushURL(boolean, java.lang.String,
java.lang.String [], java.io.Reader, java.io.InputStream, java.lang.String,
boolean)
void gnu.xml.aelfred2.XmlParser.doParse(java.lang.String,
java.lang.String, java.io.Reader, java.io.InputStream, java.lang.String)
void gnu.xml.aelfred2.SAXDriver.parse(org.xml.sax.InputSource)
void gnu.xml.aelfred2.XmlReader.parse(org.xml.sax.InputSource)
void
org.xml.sax.helpers.XMLReaderAdapter.parse(org.xml.sax.InputSource)
void javax.xml.parsers.SAXParser.parse(org.xml.sax.InputSource,
org.xml.sax.HandlerBase)
void javax.xml.parsers.SAXParser.parse(java.io.InputStream,
org.xml.sax.HandlerBase)
java.lang.Object
org.apache.struts.digester.Digester.parse(java.io.InputStream)
void org.apache.struts.action.ActionServlet.initMapping()
void org.apache.struts.action.ActionServlet.init()
void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
void com.ibm.servlet.engine.webapp.StrictServletInstance.doInit()
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet._init(javax.servlet.Ser
vletConfig)
void
com.ibm.servlet.engine.webapp.PreInitializedServletState.init(com.ibm.servle
t.engine.webapp.StrictLifecycleServlet, javax.servlet.ServletConfig)
void
com.ibm.servlet.engine.webapp.StrictLifecycleServlet.init(javax.servlet.Serv
letConfig)
void com.ibm.servlet.engine.webapp.ServletInstance.init()
void javax.servlet.GenericServlet.init(javax.servlet.ServletConfig)
void
com.ibm.servlet.engine.webapp.ServletManager.addServlet(java.lang.String,
javax.servlet.Servlet, java.util.Properties)
void
com.ibm.servlet.engine.webapp.WebAppServletManager.loadServlet(java.lang.Str
ing)
void
com.ibm.servlet.engine.webapp.WebAppServletManager.loadAutoLoadServlets()
void com.ibm.servlet.engine.webapp.WebApp.loadServletManager()
void
com.ibm.servlet.engine.webapp.WebApp.init(com.ibm.servlet.engine.config.WebA
ppInfo, com.ibm.servlet.engine.webapp.WebAppContext)
void com.ibm.servlet.engine.srt.WebGroup.loadWebApp()
void
com.ibm.servlet.engine.srt.WebGroup.init(com.ibm.servlet.engine.ServletHost,
com.ibm.servlet.engine.config.WebGroupInfo)
void com.ibm.servlet.engine.ServletHost.loadWebGroups()
void
com.ibm.servlet.engine.ServletHost.init(com.ibm.servlet.engine.ServletEngine
, com.ibm.servlet.engine.config.ServletHostInfo)
void com.ibm.servlet.engine.ServletEngine.loadServletHosts()
void
com.ibm.servlet.engine.ServletEngine.init(com.ibm.servlet.engine.config.Serv
letEngineInfo)
com.ibm.servlet.engine.ServletEngine
com.ibm.servlet.engine.ServletEngine.getEngine()
void
com.ibm.ivj.control.node.ServletEngineRunner.startServletEngine(boolean)
boolean com.ibm.ivj.control.node.ServletEngineRunner.startServer()
void
com.ibm.ivj.control.node.ServletEngineRunner.main(java.lang.String [])
java.lang.Object java.lang.reflect.Method.invoke(java.lang.Object,
java.lang.Object [])

Parse Warning at line 5 column 64: No base URI; hope URI is absolute:
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
org.xml.sax.SAXParseException: No base URI; hope URI is absolute:
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd

Parse Warning at line 5 column 66: No base URI; hope this SYSTEM id is
absolute: http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd
org.xml.sax.SAXParseException: No base URI; hope this SYSTEM id is absolute:
http://jakarta.apache.org/struts/dtds/struts-config_1_0.dtd

Parse Warning at line 5 column 66: URI was not reported to parser for entity
[dtd]
org.xml.sax.SAXParseException: URI was not reported to parser for entity
[dtd]