You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by Andy <lo...@mac.com> on 2000/06/22 06:35:53 UTC

Is javax.xml.parsers.SAXParserFactory.newSAXParser() implemented?

Sorry if this is a really obvious question, but its not in the FAQ and the
list archive server seems to be down...

I'm trying to create a SAX Parser using the generic javax.xml... interface
like so:


		try {
			
			SAXParserFactory factory = SAXParserFactory.newInstance();
			p = factory.newSAXParser().getParser();
			
		} catch (ParserConfigurationException e) {
			System.out.println(e);
			e.printStackTrace();
		} catch (SAXException sax) {
			System.out.println(sax);
			sax.printStackTrace();
		}


But what  I get is:

Exception Occurred:
javax.xml.parsers.FactoryConfigurationError: Cannot load class
SAXParserFactory class "org.apache.xerces.jaxp.SAXParserFactoryImpl"
	at javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:153)
	[etc]


When I look for org.apache.xerces.jaxp.* in the Xerces JAR file, it seems
to be missing.

I'm using the Xerces 1.1.1 binary release.

Am I missing something obvious or is the ....jaxp.SAXParserFactoryImpl
class just plain missing?

AndyT

Re: Is javax.xml.parsers.SAXParserFactory.newSAXParser() implemented?

Posted by Andy <lo...@mac.com>.

Christopher Elkins wrote:

> > Am I missing something obvious or is the ....jaxp.SAXParserFactoryImpl
> > class just plain missing?
> >
> It's just plain missing. ;-)  It was an oversight when 1.1.1 was released and
> has since been fixed in CVS.

Aha! Glad to know I'm not going mad (well OK, that this isn't a symptom!)

I found the CVS repository, and I see its only 4 classes in this package...
should be a simple enough thing to just build these 4 and put them in the JAR?

AndyT

Re: Is javax.xml.parsers.SAXParserFactory.newSAXParser() implemented?

Posted by Christopher Elkins <ce...@scardini.com>.
> Sorry if this is a really obvious question, but its not in the FAQ and the
> list archive server seems to be down...
>
<snip>
>
> When I look for org.apache.xerces.jaxp.* in the Xerces JAR file, it seems
> to be missing.
>
> I'm using the Xerces 1.1.1 binary release.
>
> Am I missing something obvious or is the ....jaxp.SAXParserFactoryImpl
> class just plain missing?
>
It's just plain missing. ;-)  It was an oversight when 1.1.1 was released and
has since been fixed in CVS.

> AndyT
>

--
Christopher Elkins


Re: Is javax.xml.parsers.SAXParserFactory.newSAXParser() implemented?

Posted by Kevin Regan <ke...@valicert.com>.
This is indeed missing from the 1.1.1 release.  Take a look at the
mail archive for details.  This seems to be a pretty common
post (I am one of the guilty ones who did not check the mail
archive first...).  I'm wondering if it would make sense to
release a 1.1.1a or 1.1.2 version to fix this, and cut down
on this common problem...

--Kevin

Kevin Regan
kevinr@valicert.com


On Wed, 21 Jun 2000, Andy wrote:

> Sorry if this is a really obvious question, but its not in the FAQ and
> the
> list archive server seems to be down...
> 
> I'm trying to create a SAX Parser using the generic javax.xml...
> interface
> like so:
> 
> 
> 		try {
> 			
> 			SAXParserFactory factory =
> SAXParserFactory.newInstance();
> 			p = factory.newSAXParser().getParser();
> 			
> 		} catch (ParserConfigurationException e) {
> 			System.out.println(e);
> 			e.printStackTrace();
> 		} catch (SAXException sax) {
> 			System.out.println(sax);
> 			sax.printStackTrace();
> 		}
> 
> 
> But what  I get is:
> 
> Exception Occurred:
> javax.xml.parsers.FactoryConfigurationError: Cannot load class
> SAXParserFactory class "org.apache.xerces.jaxp.SAXParserFactoryImpl"
> 	at
> javax.xml.parsers.SAXParserFactory.newInstance(SAXParserFactory.java:153
> )
> 	[etc]
> 
> 
> When I look for org.apache.xerces.jaxp.* in the Xerces JAR file, it
> seems
> to be missing.
> 
> I'm using the Xerces 1.1.1 binary release.
> 
> Am I missing something obvious or is the ....jaxp.SAXParserFactoryImpl
> class just plain missing?
> 
> AndyT
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-j-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-j-dev-help@xml.apache.org
>