Uploaded image for project: 'Shale'
  1. Shale
  2. SHALE-305

Remove dependency on JSP from commonsValidator

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4-SNAPSHOT, 1.0.5-SNAPSHOT
    • 1.0.4
    • Core
    • None
    • Facelets 1.1.11
      JBoss 4.0.4GA (Tomcat 5.5)
      Sun JSF 1.2_01
      Tomahawk 1.1.5-SNAPSHOT
    • Patch

    Description

      A NoClassDefFoundError is raised when using the commonsValidator component with a non-jsp2.1 container + JSF RI1.2 + Facelets. This is caused by calls to UIComponentTag.isValueReference() - deprecated in 1.2 and should only be used by JSP tags.

      A similar issue was reported by Ryan Lubke for the MyFaces Tomahawk project:
      https://issues.apache.org/jira/browse/TOMAHAWK-589

      The attached patch contains the same method contributed by Ryan to Tomahawk. Similar changes should be made to a few other places in shale-clay and shale-core where the aforementioned method call is also used where it needn't be.

      stacktrace follows:

      java.lang.NoClassDefFoundError: javax/servlet/jsp/tagext/JspIdConsumer
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
      org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      java.lang.ClassLoader.defineClass1(Native Method)
      java.lang.ClassLoader.defineClass(ClassLoader.java:620)
      java.security.SecureClassLoader.defineClass(SecureClassLoader.java:124)
      org.apache.catalina.loader.WebappClassLoader.findClassInternal(WebappClassLoader.java:1812)
      org.apache.catalina.loader.WebappClassLoader.findClass(WebappClassLoader.java:866)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1319)
      org.apache.catalina.loader.WebappClassLoader.loadClass(WebappClassLoader.java:1198)
      java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      org.apache.shale.validator.faces.ValidatorInputRenderer.encodeBegin(ValidatorInputRenderer.java:141)
      javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:810)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:881)
      javax.faces.render.Renderer.encodeChildren(Renderer.java:137)
      javax.faces.component.UIComponentBase.encodeChildren(UIComponentBase.java:828)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:883)
      javax.faces.component.UIComponent.encodeAll(UIComponent.java:889)
      com.sun.facelets.FaceletViewHandler.renderView(FaceletViewHandler.java:578)
      com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:134)
      com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:248)
      com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:144)
      javax.faces.webapp.FacesServlet.service(FacesServlet.java:245)
      org.apache.myfaces.webapp.filter.ExtensionsFilter.doFilter(ExtensionsFilter.java:144)
      org.apache.shale.faces.ShaleApplicationFilter.doFilter(ShaleApplicationFilter.java:267)
      org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)

      Attachments

        1. site.patch
          8 kB
          reind
        2. site.patch
          3 kB
          reind

        Activity

          People

            craigmcc Craig R. McClanahan
            reind reind
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: