users@woodstock.java.net

RE: JSF1004 error on deployment; ClassCastException

From: Romanowski, Tim <tim.romanowski_at_lmco.com>
Date: Fri, 23 Mar 2007 12:12:54 -0400

Ken, thanks for the response. Unfortunately, my corporate firewall blocks
all IRC access, so this list is my only option. Your tip to turn off
verification did in fact work. But, I'd like to find the root cause as that
is really just a workaround.

 

I tried the latest version of Glassfish - V2 Build 40 - but I'm getting the
same problem. That build should be the latest version of JSF (unless I were
to use nightlies, which I'm hoping is not necessary-build 40 came out on
Wednesday). I compared my faces-config to the example that comes with
Woodstock, and I don't see anything special in the Woodstock one. In my
facelets-config, I don't have any components specified, nor anything else
other than managed beans, converters, and navigation cases.

 

[snip]

  <application>

    <locale-config>

      <default-locale>en</default-locale>

    </locale-config>

  </application>

[/snip]

 

 

Is anyone else out there running into a similar problem?

 

  _____

From: Ken.Paulsen_at_Sun.COM [mailto:Ken.Paulsen_at_Sun.COM]
Sent: Thursday, March 22, 2007 7:19 PM
To: users_at_woodstock.dev.java.net
Subject: Re: JSF1004 error on deployment; ClassCastException

 


Hi Tim,

JSF things ValueBindingFilterCriteria is defined as a UIComponent. I
believe it gets this information from the faces-config.xml file(s). I don't
know if the faces-config.xml file supplied with Woodstock is wrong, if your
environment somehow is wrong, or if JSF has a bug. You can probably get
around this by turning off verification, or you may want to try upgrading to
the newest version of JSF (there have been fixes in this area recently...
not sure if this is addressed or not).

You might want to join the ##jsf IRC channel where some of the JSF RI
developers spend a lot of time... you'll get very fast response time to your
questions.

Good luck!

Ken Paulsen
ken.paulsen_at_sun.com
https://jsftemplating.dev.java.net

Romanowski, Tim wrote:

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

--------------------------------------------------------------------- To
unsubscribe, e-mail: users-unsubscribe_at_woodstock.dev.java.net For additional
commands, e-mail: users-help_at_woodstock.dev.java.net