Help! JSF keeps barfing: Non-serializable attribute

I keep getting the following exception whenever I try to hit a JSF page:

java.lang.IllegalArgumentException: setAttribute: Non-serializable attribute

org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1255)

org.apache.catalina.session.StandardSession.setAttribute(StandardSession.java:1233)

org.apache.catalina.session.StandardSessionFacade.setAttribute(StandardSessionFacade.java:129)

com.sun.faces.context.SessionMap.put(ExternalContextImpl.java:556)

com.sun.faces.application.StateManagerImpl.saveSerializedView(StateManagerImpl.java:138)

com.sun.faces.taglib.jsf_core.ViewTag.doAfterBody(ViewTag.java:169)

org.apache.jsp.mp.index_jsp._jspx_meth_f_view_0(index_jsp.java:113)

org.apache.jsp.mp.index_jsp._jspService(index_jsp.java:61)

org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:334)

org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)

org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)

javax.servlet.http.HttpServlet.service(HttpServlet.java:802)

com.sun.faces.context.ExternalContextImpl.dispatch(ExternalContextImpl.java:322)

com.sun.faces.application.ViewHandlerImpl.renderView(ViewHandlerImpl.java:130)

com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:87)

com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)

com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:117)

javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)

The code of my JSF page is pretty simple:

<%@ taglib uri="http://java.sun.com/jsf/html" prefix="h" %>

<%@ taglib uri="http://java.sun.com/jsf/core" prefix="f" %>

<f:loadBundle basename="messages" var="msg"/>

<f:view>Hi there!</f:view>

What the heck could I possibly be doing wrong?

[2243 byte] By [xoxotaa] at [2007-11-27 9:34:01]
# 1
What version of the RI are you using?
rlubkea at 2007-7-12 22:57:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 2

Well, I don't know what RI stands for, but I figured it out. Basically, if you have the <distributable /> tag in your web.xml, JSF breaks. No clue why, but I removed it, and everything works now.

thanks,

[edit] More accurately, Tomcat requires that items placed in the Sesison State implement Serializable, which I guess something in JSF doesn't do. This is more likely a Tomcat issue than a JSF issue.

Message was edited by:

xoxota

xoxotaa at 2007-7-12 22:57:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...
# 3
RI stands for Reference Implementation. This was an issue with the earlier version of the RI, but shouldn't be a problem in 1.1_02 or any of the 1.2 series.
rlubkea at 2007-7-12 22:57:08 > top of Java-index,Enterprise & Remote Computing,Web Tier APIs...