My Java EE web application is working fine with Glassfish 2.1. Now I want to migrate to Glassfish 3.1.1
I have followed the modifications provided h
java.lang.ClassCastException: java.lang.String cannot be cast to javax.faces.component.UIComponent at com.sun.faces.application.ApplicationImpl.createComponentApplyAnnotations
This particular exception will occur when you have a String
value property like
private String value;
and are binding it to a component using the binding
attribute:
<h:inputText binding="#{bean.value}" />
This is incorrect. The value should be bound using the value
attribute:
<h:inputText value="#{bean.value}" />
The binding
is only to be used to bind the whole component (which is an instance of UIComponent
) to the backing bean, for example to programmaticlly modify it.
Verify your login.xhtml
code. If necessary cut out as much as possible code as long as you can still reproduce the problem so that you can end up with the smallest possible code snippet which reproduces exactly this problem which should allow you to find the culprit easier.