Bug 30050

Summary: Explicit dependency to Xalan breaks JSTL xml tags with J2SE 1.5
Product: Taglibs Reporter: Henrik Eriksson <henrik119>
Component: Standard TaglibAssignee: Tomcat Developers Mailing List <dev>
Status: RESOLVED LATER    
Severity: major    
Priority: P3    
Version: 1.1.0   
Target Milestone: ---   
Hardware: All   
OS: All   

Description Henrik Eriksson 2004-07-12 13:47:18 UTC
SYMPTOM(s): 
Exceptions when using JSTL Transform tags with Tomcat 5.0.x web application:

exception 

javax.servlet.ServletException: Provider 
org.apache.xalan.processor.TransformerFactoryImpl not found
	org.apache.jasper.runtime.PageContextImpl.doHandlePageException
(PageContextImpl.java:825)
	org.apache.jasper.runtime.PageContextImpl.handlePageException
(PageContextImpl.java:758)
	org.apache.jsp.xml.Transform_jsp._jspService(Transform_jsp.java:135)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:298)
	org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)


root cause 

javax.xml.transform.TransformerFactoryConfigurationError: Provider 
org.apache.xalan.processor.TransformerFactoryImpl not found
	javax.xml.transform.TransformerFactory.newInstance(Unknown Source)
	org.apache.taglibs.standard.tag.common.xml.TransformSupport.doStartTag
(Unknown Source)
	org.apache.jsp.xml.Transform_jsp._jspx_meth_x_transform_0
(Transform_jsp.java:224)
	org.apache.jsp.xml.Transform_jsp._jspService(Transform_jsp.java:89)
	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:94)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)
	org.apache.jasper.servlet.JspServletWrapper.service
(JspServletWrapper.java:298)
	org.apache.jasper.servlet.JspServlet.serviceJspFile
(JspServlet.java:292)
	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
	javax.servlet.http.HttpServlet.service(HttpServlet.java:810)



STEPS TO REPRODUCE:
 1) Install J2SE 1.5 Beta 2 as the only JVM on a maching
 2) Install Tomcat 5.0.25 
 3) Deploy JSTL Sample Web Application (standard-example.war) on Tomcat
 4) Visit http://localhost:8080/standard-examples/xml/Transform.jsp

CAUSE: 
Xalan package has been renamed to new "hidden" and non-public package name in 
J2SE 1.5 causing the explicit dependencies to this package in JSTL 1.1 to 
break when run on J2SE 1.5. See 
http://java.sun.com/j2se/1.5.0/docs/guide/xml/jaxp/JAXP-Compatibility_150.html 
for more info.

REMEDY:
Remove explict dependency to Xalan package(s) in Apache standard taglib
Comment 1 Justyna Horwat 2004-07-15 20:06:16 UTC
With the next JSTL maintenance release we are planning on moving to use JAXP 1.3. This will hopefully 
address several of the outstanding bugs related to xml performance and will also result in some code 
cleanup. With JAXP 1.3 the dependency on the xalan api's will be removed.

JAXP 1.3 is currently in public draft and available through the J2SE 5.0 Beta. It should be available 
standalone through Xalan and Xerces soon so you won't need to wait for J2SE 5.0 on your platform of 
choice (mine being Mac OS X 10.3.4). It won't be final until J2SE 5.0 becomes final later this year. 

I'm assigning this bug to myself in the meantime.

With JSTL 1.1.x you can use the endorsed directories mechanism to use a JAXP 1.2 implementation 
along with J2SE 5.0.
Comment 2 Justyna Horwat 2004-07-15 21:26:13 UTC
*** Bug 30051 has been marked as a duplicate of this bug. ***
Comment 3 Henri Yandell 2006-12-06 17:15:48 UTC
The source still depends on org.apache.xalan in the latest release, so moving to
JAXP 1.3 is still a TODO. 

This needs to be FAQ'd.
Comment 4 Henri Yandell 2007-01-29 17:00:01 UTC
Added to the FAQ:

http://wiki.apache.org/jakarta-taglibs/Standard1%2e1%2e3FAQ
Comment 5 Henri Yandell 2009-11-29 19:55:07 UTC
Resolving as getting off of Xalan is, while desirable, unlikely.