Uploaded image for project: 'TomEE'
  1. TomEE
  2. TOMEE-2113

jsp using xpath expression via select attribute fails with ClassNotFoundException

Attach filesAttach ScreenshotAdd voteVotersWatch issueWatchersCreate sub-taskConvert to sub-taskLinkCloneLabelsUpdate Comment AuthorReplace String in CommentUpdate Comment Visibility
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Open
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: 7.0.4
    • Fix Version/s: None
    • Component/s: TomEE Core Server
    • Labels:
      None

      Description

      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)
      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)

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              katya.k.todorova Katya Todorova

              Dates

              • Created:
                Updated:

                Issue deployment