Return-Path: Delivered-To: apmail-xml-xalan-j-users-archive@xml.apache.org Received: (qmail 85789 invoked by uid 500); 17 Dec 2002 21:20:14 -0000 Mailing-List: contact xalan-j-users-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Delivered-To: mailing list xalan-j-users@xml.apache.org Received: (qmail 85781 invoked from network); 17 Dec 2002 21:20:14 -0000 Received: from e33.co.us.ibm.com (32.97.110.131) by daedalus.apache.org with SMTP; 17 Dec 2002 21:20:14 -0000 Received: from westrelay02.boulder.ibm.com (westrelay02.boulder.ibm.com [9.17.194.23]) by e33.co.us.ibm.com (8.12.2/8.12.2) with ESMTP id gBHLK9aO044724; Tue, 17 Dec 2002 16:20:10 -0500 Received: from d25ml01.torolab.ibm.com (d25ml01.torolab.ibm.com [9.26.6.102]) by westrelay02.boulder.ibm.com (8.12.3/NCO/VER6.4) with ESMTP id gBHLIrTC014696; Tue, 17 Dec 2002 14:18:53 -0700 Subject: RE: adding xalan & xerces.jar to classpath (sequence problem) To: IrisAL@Sycron-IT.com, xalan-j-users@xml.apache.org X-Mailer: Lotus Notes Release 5.0.7 March 21, 2001 Message-ID: From: ilene@ca.ibm.com Date: Tue, 17 Dec 2002 16:18:52 -0500 X-MIMETrack: Serialize by Router on D25ML01/25/M/IBM(Release 5.0.9a |January 7, 2002) at 12/17/2002 04:18:53 PM MIME-Version: 1.0 Content-type: text/plain; charset=us-ascii X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N Hi, In Xalan 2.2, the xerces.jar packaged with Xalan included the JAXP code, including javax.xml.parsers.SAXParserFactory. (Now Xerces packages the JAXP code in the xmlParserAPIs.jar). Xalan packaged a superset of these classes (we also included the TrAX interfaces) in xml-apis.jar. However, although we packaged an overlapping set of classes, we sometimes had different implementations. (We're working on using a common set of JAXP classes that will be located in the xml-commons project.) So, I went and had a look at the SAXParserFactory.java implementations in xerces.jar and xml-apis.jar and they are different. In particular, the code which returns an instance of a SAXParserFactory is different. SAXParserFactory.newInstance() uses an ordered lookup procedure for identifying which SAXParserFActory to return. If it gets to the end of the lookup procedure and hasn't figured out what to return, it uses a fallback mechanism, which is a hardcoded class name. In xml-apis.jar (the version you're working with) the hardcoded class name is null! In xerces.jar, it is probably org.apache.xerces.jaxp.SAXParserFactoryImpl although I don't have the xerces source to verify. The error message that you're seeing corresponds to the message you would see if the SAXParserFactory tried the fallback class name and it was null. So, an interesting question (to me) is why all the other steps in the lookup procedure failed. Here are the steps it uses: * If set, use the javax.xml.parsers.SAXParserFactory system property. * Use JAVA_HOME\lib\jaxp.properties file (if it exists) and look for the key above. * Use the Services API as specified in the JAR specification to search jars in the classpath for a SAXParserFactory * Fallback to a hardcoded default class name As an experiment you could try setting the javax.xml.parsers.SAXParserFactory system property to org.apache.xerces.jaxp.SAXParserFactoryImpl and see if that helps. Ilene. IrisAL@Sycron-IT. com To: Christian.Hujer@itcqis.com, xalan-j-users@xml.apache.org cc: 12/17/2002 08:07 Subject: RE: adding xalan & xerces.jar to classpath (sequence problem) AM Thanx for your response Christian! I'm using the jdk1.3.1 in a Windows2000 environment with xalan2.2 I have looked in the FAQ and nothing seems to answer to my problem... Greetz.