Joe,

Your web.xml looks good and a quick look at the JSF RI source code shows that 
it is not Serializable (I just peeked at the JSF 2.0.2 code which was released 
on the 10th and the class isn't Serializable there).  As described in the 
source code for the javax.faces.context.Flash 
(http://www.docjar.com/docs/api/javax/faces/context/Flash.html) object 
indicates the following:

> The flash is an application scoped object that must be thread safe, and 
> provide a programming model that lets each session treat the flash as if it 
> was a session scoped object.

The reference implementation of the object should be Serializable in order to 
execute on the GAE platform.  It is probably worth filing a bug 
(https://javaserverfaces.dev.java.net/issues/) with Sun on the matter.

Derek


On Dec 10, 2009, at 2:18 PM, Sector7B wrote:

> Hi, followed the examples below{} for JSF on GAE:
> 
> {https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-
> Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-
> reference-implementation/configuring-jsf-20-to-run-on-the-google-
> appengine/javaserverfaces-20-and-google-app-engine-compatibility-
> issues
> 
> https://sites.google.com/a/wildstartech.com/adventures-in-java/Java-Platform-Enterprise-Edition/JavaServer-Faces/sun-javaserver-faces-reference-implementation/configuring-jsf-20-to-run-on-the-google-appengine
> 
> http://java.dzone.com/news/jsf2-configuration-google-app}
> 
> When i run locally, just the example given it works fine.
> When i run live i get this error:
> java.lang.RuntimeException: java.io.NotSerializableException:
> com.sun.faces.context.flash.ELFlash
> 
> searches come up with nothing for me?  It would seem the engine
> requires ELFlash to be serializable, but I guess its not.
> http://www.docjar.com/docs/api/com/sun/faces/context/flash/ELFlash.html
> 
> It looks like a lot of people have gotten this to work, it seems weird
> i can't fine an example of this breaking for someone else.
> 
> Any thoughts?
> 
> Thanks
> 
> web.xml:
> ....
>       <context-param>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>client</param-value>
>  </context-param>
>  <context-param>
>  <param-name>javax.faces.DEFAULT_SUFFIX</param-name>
>    <param-value>.xhtml</param-value>
>  </context-param>
>      <context-param>
>        <param-name>com.sun.faces.expressionFactory</param-name>
>        <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
>    </context-param>
>  <!-- GAE Bug 1506 JSP 2.1 API but 2.0 Implementation -->
>  <context-param>
>    <param-name>com.sun.faces.expressionFactory</param-name>
>    <param-value>com.sun.el.ExpressionFactoryImpl</param-value>
>  </context-param>
>  <context-param>
>    <description>
>      Set this flag to true if you want the JavaServer Faces
>      Reference Implementation to validate the XML in your
>      faces-config.xml resources against the DTD. Default
>      value is false.
>    </description>
>    <param-name>com.sun.faces.validateXml</param-name>
>    <param-value>true</param-value>
>  </context-param>
>  <!-- ***** Accommodate Single-Threaded Requirement of Google
> AppEngine  -->
>  <context-param>
>    <description>
>      When enabled, the runtime initialization and default
> ResourceHandler
>      implementation will use threads to perform their functions. Set
> this
>      value to false if threads aren't desired (as in the case of
> running
>      within the Google Application Engine).
> 
>      Note that when this option is disabled, the ResourceHandler will
> not
>      pick up new versions of resources when ProjectStage is
> development.
>    </description>
>    <param-name>com.sun.faces.enableThreading</param-name>
>    <param-value>false</param-value>
>  </context-param>
>  <!-- Seems like GAE 1.2.6 cannot handle server side session
> management. At least for JSF 2.0.1 -->
>  <context-param>
>    <param-name>javax.faces.STATE_SAVING_METHOD</param-name>
>    <param-value>client</param-value>
>  </context-param>
> <!-- Recommendation from GAE pages  -->
>  <context-param>
>    <param-name>javax.faces.PROJECT_STAGE</param-name>
>    <param-value>Production</param-value>
>  </context-param>
>  <!-- Faces Servlet -->
>  <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>/faces/*</url-pattern>
>    <url-pattern>*.jsf</url-pattern>
>  </servlet-mapping>
>  <session-config>
>    <session-timeout>30</session-timeout>
>  </session-config>
>  <welcome-file-list>
>    <welcome-file>index.jsp</welcome-file>
>    <welcome-file>index.xhtml</welcome-file>
>    <welcome-file>index.html</welcome-file>
>  </welcome-file-list>
> ....
> 
> --
> 
> You received this message because you are subscribed to the Google Groups 
> "Google App Engine for Java" group.
> To post to this group, send email to google-appengine-j...@googlegroups.com.
> To unsubscribe from this group, send email to 
> google-appengine-java+unsubscr...@googlegroups.com.
> For more options, visit this group at 
> http://groups.google.com/group/google-appengine-java?hl=en.
> 
> 

--

You received this message because you are subscribed to the Google Groups 
"Google App Engine for Java" group.
To post to this group, send email to google-appengine-j...@googlegroups.com.
To unsubscribe from this group, send email to 
google-appengine-java+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/google-appengine-java?hl=en.


Reply via email to