commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Simon Kitching" <>
Subject RE: digester needs SAXParser.getXMLReader
Date Mon, 13 May 2002 23:05:12 GMT
Robert, thanks for taking the time to reply. 

Unfortunately, it looks like crimson/apache already have the JAXP
api bundled with them. There are certainly lots of javax.xml.* classes
in the jar files.
The url <> also contains
this statement:
In JAXP RI 1.1.3, which includes the Apache Crimson 1.1.3 parser, both
API and implementation classes are contained in the same jar files:
crimson.jar for the parser and xalan.jar for the XSLT processor.

I should have been more specific in my original email; in particular I
should have said:
* Digester needs method javax.xml.parsers.SAXParser.getXMLReader().
* crimson 1.1.3 provides an implementation of class
javax.xml.parsers.SAXParser; this
  implementation has most of the methods that JAXP 1.1 docs say it
should have - 
  _except_ for the getXMLReader() method.
* xerces-J 2.0.1 has the same issue. The parser now comes in two jars,
one "xercesImpl.jar"
  that provides the actual parser, and one "xmlParserAPIs.jar" that
presumably provides 
  wrappers to map standard apis to the implementation. The
xercesImpl.jar, like crimson 1.1.3,
  provides a javax.xml.parsers.SAXParser class, and this is also without
the getXMLReader()

Reading the javadoc for javax.xml.parsers.SAXParser more carefully, I

<begin extract from javadoc>
public abstract class SAXParser
extends java.lang.Object

Defines the API that wraps an XMLReader implementation class. In JAXP
1.0, this class wrapped the Parser interface, however this interface was
replaced by the XMLReader. 
<end extract from javadoc>

This implies that the getXMLReader() method was introduced in JAXP1.1
(the method doesn't say but I
presume it was introduced when the underlying class became an

Xerces 2.0.1 claims to implement JAXP1.1, as does Crimson 1.1.3.
Therefore, surely, they should have the getXMLReader() method..but they
don't. And surely I don't need an additional library, otherwise there
would be two implementations of the javax.xml.parsers.SAXParser class...

On the other hand, there must surely be people using digester on java
1.3. As digester is part of Tomcat4,
and it works, maybe I need to look at what xml lib Tomcat 4 bundles?

Still puzzled; anyone got any ideas?


-----Original Message-----
From: robert burrell donkin [] 
Sent: Tuesday, May 14, 2002 4:38 AM
To: Jakarta Commons Developers List
Subject: Re: digester needs SAXParser.getXMLReader 

hi simon

i think that this is a SAX/JAXP setup problem rather than a digester 

you need JAXP in your classpath. this is included with java 1.4 but not
previous jdk's.

i think that if you want to use crimson you need to include jaxp.jar 
(available from sun, i think). if you are using xerces then i think that

you'll need to download a xml-api.jar compatible with the xerces version

from full details on how to set up JAXP can be found in 
the documentation for the parser of your choice.

- robert

On Sunday, May 12, 2002, at 11:48 PM, Simon Kitching wrote:

> I have been using digester with java1.4 quite happily.
> I now need to deploy the app on java1.3; I expected to have to place a

> suitable xml parser implementation in the classpath.
> However, it appears that Digester needs the following method:
>    javax.xml.parsers.SAXParser.getXMLReader
> This is not provided by either Xerces 2.0.1 OR crimson 1.1.3 (I get 
> NoSuchMethod and javap on the class doesn't show it).
> The java 1.4 docs indicate that this method should exist; there is no 
> "since version x" note on this method, so I have no idea if it is a 
> "new" method or not.
> Any suggestions how I can use Digester on java 1.3?
> Thanks,
> Simon

To unsubscribe, e-mail:
For additional commands, e-mail:

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message