Sorry for the barrage of messages about this problem yesterday. I should
have waited until I had the complete story, and done my homework better
before posting to the list. To make up for this, here's a summary of
what I've found by now.

The visible problem is that the <x:transform> in the Standard library
(JSTL RI), versions 1.0 and 1.0.1 throws the following exception when
running with JDK 1.3.x (at least 1.3.1_01), on any platform (most
likely):

javax.servlet.jsp.JspException: SAX2 driver class 
org.apache.crimson.parser.XMLReaderImpl not found at
org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag(TransformSupport.java:170)
[...]

In other words, it's looking for the Crimson parser instead of using the
bundled Xerces parser. This seems to be related to how factory classes
for various XML tasks are located. Xalan looks for a factory for
something called a "SAX 2 driver" using the property name
"org.xml.sax.driver". I assume that the rules for locating this factory
are the same as for the JAXP DocumentBuilderFactory, etc. Since
xercesImpl.jar correctly contains an entry for this property in the
META-INF/services directory, it should be found but it isn't when using
JDK 1.3.x.

One solution is to define the "org.xml.sax.driver" property explicitly
as an option to the java command. For Tomcat 4, the easiest way to do
this is to set the CATALINA_OPS environment variable:

   CATALINA_OPTS=-Dorg.xml.sax.driver=org.apache.xerces.parsers.SAXParser

I also tried another approach. It turns out that the Class-Path
header in the META-INF/MANIFEST.MF file in xalan.jar lists dependencies
on jaxp.jar and crimson.jar instead of the bundled jaxp-api.jar and
xercesImpl.jar. I figured this could cause the problem so I patched the
xalan.jar file to use a manifest with Class-Path set to the correct
JAR files instead, but no luck.

Unless someone else has a better solution than the one presented above,
I suggest we include it in the README for Standard 1.0.2.

Hans
-- 
Hans Bergsten           [EMAIL PROTECTED]
Gefion Software         http://www.gefionsoftware.com
JavaServer Pages        http://TheJSPBook.com


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to