facebook

JSF error when using STATE_SAVING_METHOD = "client&quot

  1. MyEclipse IDE
  2.  > 
  3. Java EE Development (EJB, JSP, Struts, XDoclet, etc.)
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #230562 Reply

    jspors
    Member

    I get the following error when setting STATE_SAVING_METHOD to “client” in web.xml. It works fine when set to “server”. I replaced the jsf-api.jar and jsf-impl.jar with different copies not created by MyEclipse and it works fine set to both “server” and “client”. Any ideas?

    MyEclipse Version: 3.9.100
    Build id: 20050508-4.0-Milestone-1

    Error

    HTTP Status 500 -
    
    type Exception report
    
    message
    
    description The server encountered an internal error () that prevented it from fulfilling this request.
    
    exception
    
    java.lang.ClassCastException: java.util.HashMap
       javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:1101)
       javax.faces.component.UIOutput.restoreState(UIOutput.java:179)
       javax.faces.component.UIInput.restoreState(UIInput.java:1006)
       javax.faces.component.html.HtmlInputText.restoreState(HtmlInputText.java:835)
       javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:999)
       javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1011)
       javax.faces.component.UIComponentBase.processRestoreState(UIComponentBase.java:1011)
       com.sun.faces.application.StateManagerImpl.restoreComponentState(StateManagerImpl.java:273)
       com.sun.faces.application.StateManagerImpl.restoreView(StateManagerImpl.java:184)
       com.sun.faces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:246)
       com.sun.faces.lifecycle.RestoreViewPhase.execute(RestoreViewPhase.java:157)
       com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
       com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
       javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
    
    note The full stack trace of the root cause is available in the Apache Tomcat/5.5.7 logs.
    Apache Tomcat/5.5.7 

    web.xml

    <?xml version="1.0" encoding="UTF-8"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="2.4" xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee   http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
      <context-param>
        <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
        <param-value>client</param-value>
      </context-param>
      <context-param>
        <param-name>javax.faces.CONFIG_FILES</param-name>
        <param-value>/WEB-INF/faces-config-rules.xml,/WEB-INF/faces-config-beans.xml</param-value>
      </context-param>
     
      <servlet>
        <servlet-name>Faces Servlet</servlet-name>
        <servlet-class>javax.faces.webapp.FacesServlet</servlet-class>
        <load-on-startup>1</load-on-startup>
      </servlet>
      <servlet-mapping>
        <servlet-name>Faces Servlet</servlet-name>
        <url-pattern>*.jsf</url-pattern>
      </servlet-mapping>
    </web-app> 
    #230608 Reply

    Riyad Kalla
    Member

    We ship the Sun RI and MyFaces implementations of JSF, they are vanilla, unchanged copies of the libraries. 1) What implementation did you use when you first added JSF Capabilities and 2) what implementation of the two jars did you drop into your project?

    I’ve tested this locally and it works fine with both client and server using the libraries we ship (most recent releases AFAIK).

    #230617 Reply

    jspors
    Member

    We used the Sun RI. We tried to recreate the problem by going back to the jars supplied by MyEclipse, but everything seems to be working now. I have no idea. Sorry for the trouble and thanks for your time.

Viewing 3 posts - 1 through 3 (of 3 total)
Reply To: JSF error when using STATE_SAVING_METHOD = "client&quot

You must be logged in to post in the forum log in