I may have found a minor bug in the interaction between Xalan and JAXP
regarding the DocumentBuilder(Factory) class(es).
Simply put, when I upgraded Xalan1 to Xalan 2.1.0 and placed the jar file in
the same directory as a pre-existing crimson.jar file, my application
started spewing exceptions about DocumentBuilderImpl, DocumentBuilder, and
DocumentBuilderFactory as well as Crimson.
Upon removal of the crimson.jar file from the directory (nothing else), the
code ran without a hitch! The other oddity is that crimson.jar was not part
of the CLASSPATH in either run. It was, however, located in a directory
that is in the CLASSPATH, but that SHOULDN'T cause a problem from what I
know of CLASSPATHs and JAR files.
After a bit of detective work it appears that Xalan calls the JAXP
DocumentBuilderFactory class. This JAXP class tries to get the preferred
parser from the system properties. Failing that, it uses a hard-coded
default -- Crimson.
My code base for the application is too large to post here, and I may or may
not be able to reproduce it (because of time constraints on my part) in a
seperate class. But I was wondering if anyone had come across this issue
before. I didn't see it anywhere in Bugzilla.
The lines I belive to be the offending lines below are taken from
javax.xml.parsers.DocumentBuilderFactory:
public static DocumentBuilderFactory newInstance() {
String factoryImplName = findFactory(defaultPropName,
"org.apache.crimson.jaxp.DocumentBuilderFactoryImpl");
// the default can be removed after services are tested well enough
// ...
}
Thanks,
Brion Swanson
--------------
Brion Swanson
Software Engineer (Co-op)
West Group - Public Records
[EMAIL PROTECTED]
716-327-6164 (x6164)