users@woodstock.java.net

JSF1004 error on deployment; ClassCastException

From: Romanowski, Tim <tim.romanowski_at_lmco.com>
Date: Thu, 22 Mar 2007 18:57:01 -0400

I'm trying to add Woodstock to my webapp, but it fails on startup. I'm
using Facelets, but from the blog I found at [1] and the example war on the
project's website, I think I've covered most of the big things. Does anyone
have a suggestion on how to resolve this error on deployment? I'm using
Glassfish V2 B37, compiling with JDK 1.5.0_11-b03, and am using SUN RI
1.2_03-b9-FCS along with Ajax4JSF, Facelets 1.1.12, and Tomahawk 1.1.5
nightlies.

 

Here's a chunk of the server output:

 

Initializing Sun's JavaServer Faces implementation (1.2_03-b09-FCS) for
context '/Zadig'

JSF1004: Cannot instantiate component of type
com.sun.webui.jsf.faces.ValueBindingFilterCriteria

WebModule[/Zadig]com.sun.webui.jsf.faces.ValueBindingFilterCriteria

javax.faces.FacesException: java.lang.ClassCastException:
com.sun.webui.jsf.faces.ValueBindingFilterCriteria cannot be cast to
javax.faces.component.UIComponent

        at
com.sun.faces.application.ApplicationImpl.createComponent(ApplicationImpl.ja
va:568)

        at
com.sun.faces.config.ConfigureListener.verifyObjects(ConfigureListener.java:
1378)

        at
com.sun.faces.config.ConfigureListener.contextInitialized(ConfigureListener.
java:451)

        at
org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:
4468)

        at
org.apache.catalina.core.StandardContext.start(StandardContext.java:5120)

        at com.sun.enterprise.web.WebModule.start(WebModule.java:304)

        at
org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:9
60)

        at
org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:944)

        at
org.apache.catalina.core.StandardHost.addChild(StandardHost.java:671)

        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1574)

        at
com.sun.enterprise.web.WebContainer.loadWebModule(WebContainer.java:1217)

 

 

What I've done:

1) Added the servlet/servlet mapping to web.xml

1. <servlet>
2. <servlet-name>ThemeServlet</servlet-name>
3. <servlet-class>com.sun.webui.theme.ThemeServlet</servlet-class>

4. <load-on-startup>2</load-on-startup>
5. </servlet>
6. <servlet-mapping>
7. <servlet-name>ThemeServlet</servlet-name>
8. <url-pattern>/theme/*</url-pattern>
9. </servlet-mapping>

2) Copied the taglib (Woodstock.taglib.xml) linked off of [1], and added
that as a param-value to my facelets.LIBRARIES parameter.

 

3) Added the following context parameter:

 <context-param>

        <param-name>com.sun.webui.jsf.DEFAULT_THEME</param-name>

        <param-value>suntheme</param-value>

    </context-param>

 

4) Added the dependencies for Woodstock listed at [1] into my webapp by
copying them from the example.war (also downloaded from the Woodstock
project's website).

 

5) Tried both (on different tests) implementations of the Woodstock primary
jarfile.

 

6) Included the webuijsf namespace as well as the webuijsf:head tag into my
template file just to test that Woodstock will let me launch my app. I did
not add any other Woodstock components!

 

Any suggestions?

 

Tim

 

[1]
http://blogs.steeplesoft.com/2007/02/26/using-the-woodstock-sortable-table/#
more-49