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