You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xalan.apache.org by Jason Rizer <ja...@yahoo.com> on 2002/02/27 14:51:46 UTC

jaxp compatibility problem

Hello,

I'm trying to get my application which performs a
tranform using xalan to work in an environment which
effectively contains the jaxp1.01 versions of jaxp.jar
and parser.jar as the first entries in the classpath. 
At Gary's suggestion I set the system property
javax.xml.parsers.SAXParserFactory to
org.apache.xerces.jaxp.SAXParserFactoryImpl.  This
solved the problem in my test environment even when I
put the jaxp1.01 jars at the head of the classpath. 
However, when I run it in the production environment I
get the following error:

org.xml.sax.SAXException:
javax.xml.parsers.FactoryConfigurationError:
org.apache.xerces.jaxp.SAXParserFactoryImpl
at
org.apache.xalan.processor.TransformerFactoryImpl.newTemplates(TransformerFactoryImpl.java:909)
at
org.apache.xalan.processor.TransformerFactoryImpl.newTransformer(TransformerFactoryImpl.java:750)

It seems to be loading SAXParserFactoryImpl from
xerces.jar but there is some further problem.  The
stack trace doesn't seem to be very helpful.  Does
anyone have any idea what the problem might be? 
Thanks in advance.

-Jason

__________________________________________________
Do You Yahoo!?
Yahoo! Greetings - Send FREE e-cards for every occasion!
http://greetings.yahoo.com

RE: jaxp compatibility problem

Posted by Gary L Peskin <ga...@firstech.com>.
Jason --

Can you please write a little java program that includes these
statements:

javax.xml.parsers.SAXParserFactory factory =
            javax.xml.parsers.SAXParserFactory.newInstance();
factory.setNamespaceAware(true);
javax.xml.parsers.SAXParser jaxpParser = factory.newSAXParser();
reader = jaxpParser.getXMLReader();

This is what XalanJ does when it receives the error in your stack trace.
Hopefully, from this, you'll get a more complete stack trace from Xerces
that will show the details of the FactoryConfigurationError.

HTH,
Gary

> -----Original Message-----
> From: Jason Rizer [mailto:jasonriz@yahoo.com] 
> Sent: Wednesday, February 27, 2002 5:52 AM
> To: xalan-j-users@xml.apache.org
> Subject: jaxp compatibility problem
> 
> 
> Hello,
> 
> I'm trying to get my application which performs a
> tranform using xalan to work in an environment which 
> effectively contains the jaxp1.01 versions of jaxp.jar and 
> parser.jar as the first entries in the classpath. 
> At Gary's suggestion I set the system property 
> javax.xml.parsers.SAXParserFactory to 
> org.apache.xerces.jaxp.SAXParserFactoryImpl.  This solved the 
> problem in my test environment even when I put the jaxp1.01 
> jars at the head of the classpath. 
> However, when I run it in the production environment I
> get the following error:
> 
> org.xml.sax.SAXException:
> javax.xml.parsers.FactoryConfigurationError:
> org.apache.xerces.jaxp.SAXParserFactoryImpl
> at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
> (TransformerFactoryImpl.java:909)
> at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransform
> er(TransformerFactoryImpl.java:750)
> 
> It seems to be loading SAXParserFactoryImpl from
> xerces.jar but there is some further problem.  The
> stack trace doesn't seem to be very helpful.  Does
> anyone have any idea what the problem might be? 
> Thanks in advance.
> 
> -Jason
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Greetings - Send FREE e-cards for every occasion! 
http://greetings.yahoo.com


RE: jaxp compatibility problem

Posted by Gary L Peskin <ga...@firstech.com>.
Jason --

What release of XalanJ are you using?  You can call EnvironmentCheck
from your program to produce some additional useful information but we
don't need it just yet.  See the javadoc for EnvironmentCheck for
details.

Gary

> -----Original Message-----
> From: Jason Rizer [mailto:jasonriz@yahoo.com] 
> Sent: Wednesday, February 27, 2002 5:52 AM
> To: xalan-j-users@xml.apache.org
> Subject: jaxp compatibility problem
> 
> 
> Hello,
> 
> I'm trying to get my application which performs a
> tranform using xalan to work in an environment which 
> effectively contains the jaxp1.01 versions of jaxp.jar and 
> parser.jar as the first entries in the classpath. 
> At Gary's suggestion I set the system property 
> javax.xml.parsers.SAXParserFactory to 
> org.apache.xerces.jaxp.SAXParserFactoryImpl.  This solved the 
> problem in my test environment even when I put the jaxp1.01 
> jars at the head of the classpath. 
> However, when I run it in the production environment I
> get the following error:
> 
> org.xml.sax.SAXException:
> javax.xml.parsers.FactoryConfigurationError:
> org.apache.xerces.jaxp.SAXParserFactoryImpl
> at
> org.apache.xalan.processor.TransformerFactoryImpl.newTemplates
> (TransformerFactoryImpl.java:909)
> at
> org.apache.xalan.processor.TransformerFactoryImpl.newTransform
> er(TransformerFactoryImpl.java:750)
> 
> It seems to be loading SAXParserFactoryImpl from
> xerces.jar but there is some further problem.  The
> stack trace doesn't seem to be very helpful.  Does
> anyone have any idea what the problem might be? 
> Thanks in advance.
> 
> -Jason
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Greetings - Send FREE e-cards for every occasion! 
http://greetings.yahoo.com