[kepler-dev] [kepler-cvs] kepler/lib/jar/jwsdp xalan.jar xercesImpl.jar

Kevin Ruland kruland at ku.edu
Tue Nov 8 18:12:40 PST 2005


Dan,

That link was very interesting and made me think quite a bit.  Alas, my
system was not as I had thought.  Somebody slipped a 'java' in
c:/Windows/system32 and it was a 1.5.  Ergh.  After a good cleaning and
careful execution, I could indeed completely reproduce this.  That was
pretty dumb, wasn't it....Of Sun, not me :)  Thank you for teaching me this.

I do have more advice to Jagan though.  Since jwsdp internally uses JAXP
apis (I'd hope anyway) you should be able to set a system property to
tell it which DocumentBuilderFactory implementation you want.  From
http://java.sun.com/webservices/jaxp/faq.html  I copied this answer:

*Q. How do I use a different JAXP compatible implementation?*

The JAXP 1.1 API allows applications to plug in different JAXP
compatible implementations of parsers or XSLT processors. For example,
when an application wants to create a new JAXP |DocumentBuilderFactory|
instance, it calls the staic method
|DocumentBuilderFactory.newInstance()|. This causes a search for the
name of a concrete subclass of |DocumentBuilderFactory| using the
following order:

   1. The value of a system property like
      |javax.xml.parsers.DocumentBuilderFactory| if it exists and is
      accessible.
   2. The contents of the file |$JAVA_HOME/jre/lib/jaxp.properties| if
      it exists.
   3. The Jar Service Provider discovery mechanism specified in the Jar
      File Specification. A jar file can have a resource (i.e. an
      embedded file) such as
      |META-INF/services/javax.xml.parsers.DocumentBuilderFactory|
      containing the name of the concrete class to instantiate.
   4. The fallback platform default implementation.

Of the above ways to specify an implementation, perhaps the most useful
is the jar service provider mechanism. To use this mechanism, place the
implementation jar file on your classpath. For example, to use Xerces
1.4.4 instead of the version of Crimson which is bundled with JDK 1.4
(Java Development Kit version 1.4), place xerces.jar in your classpath.
This mechanism also works with older versions of the JDK which do not
bundle JAXP. If you are using JDK 1.4 and above, see this question
<http://java.sun.com/webservices/jaxp/faq.html#JDK14> for potential
problems.






More information about the Kepler-dev mailing list