You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tomee.apache.org by "Romain Manni-Bucau (JIRA)" <ji...@apache.org> on 2017/08/14 07:29:01 UTC

[jira] [Commented] (TOMEE-2113) jsp using xpath expression via select attribute fails with ClassNotFoundException

    [ https://issues.apache.org/jira/browse/TOMEE-2113?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16125334#comment-16125334 ] 

Romain Manni-Bucau commented on TOMEE-2113:
-------------------------------------------

for reference/link: http://tomee-openejb.979440.n4.nabble.com/Dependencies-of-jstl-implementation-1-2-5-td4682141.html

> jsp using xpath expression via select attribute fails with ClassNotFoundException
> ---------------------------------------------------------------------------------
>
>                 Key: TOMEE-2113
>                 URL: https://issues.apache.org/jira/browse/TOMEE-2113
>             Project: TomEE
>          Issue Type: Bug
>          Components: TomEE Core Server
>    Affects Versions: 7.0.4
>            Reporter: Katya Todorova
>
> Tomee 7.0.4 replaces openejb-jstl.jar with apache taglibs.* (version 1.2.5). 
> Apache taglibs depend strongly on xalan for some tags implementation (e.g. set, forEach, when, ...) in a way that if xalan is missing on the classpath, there's no fallback to default jdk implementation but rather a ClassNotFoundException. According to release notes, this is implemented in the very first release ([1.2.0|https://tomcat.apache.org/taglibs/CHANGES.txt]) 
> Openejb-jstl (that packs javax.servlet.jstl 1.2) doesn't require xalan but apparantly has performance  impact (TOMEE-1066)
> The affected tags are not some side functionality but part of JSTL 1.2 specification (Section 11.1.5) so currently TomEE 7.0.4 is not compliant with JSTL 1.2 as it was in 7.0.3
> Here's an example jsp to reproduce the problem:
> <%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
> <%@ taglib prefix="x" uri="http://java.sun.com/jsp/jstl/xml" %> 
> <html>  
> <body>
>     <x:parse var="cat">
>         <a>text</a>
>     </x:parse>
>     <x:set var="myVar" select="$cat//a"/> 	
>    </body>
> </html>  
> And the exception:
> java.lang.ClassNotFoundException: org.apache.xpath.XPath
> 	java.net.URLClassLoader$1.run(URLClassLoader.java:428)
> 	java.net.URLClassLoader$1.run(URLClassLoader.java:417)
> 	java.security.AccessController.doPrivileged(Native Method)
> 	java.net.URLClassLoader.findClass(URLClassLoader.java:416)
> 	java.lang.ClassLoader.loadClass(ClassLoader.java:494)
> 	java.lang.ClassLoader.loadClass(ClassLoader.java:427)
> 	org.apache.taglibs.standard.tag.common.xml.SetTag.setSelect(SetTag.java:74)
> 	org.apache.jsp.test_jsp._jspx_meth_x_005fset_005f0(test_jsp.java:210)
> 	org.apache.jsp.test_jsp._jspService(test_jsp.java:133)
> 	org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:70)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
> 	org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:443)
> 	org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:385)
> 	org.apache.jasper.servlet.JspServlet.service(JspServlet.java:329)
> 	javax.servlet.http.HttpServlet.service(HttpServlet.java:742)
> 	org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)