0 Replies Latest reply: Aug 16, 2012 7:19 AM by kelly goedert RSS

ViewExpiredException on a clustered environment

kelly goedert Apprentice

Hi,

 

I've posted this https://community.jboss.org/message/753917#753917 in another forum here and had no answer. Looking further on stackoverflow and google, I found people saying I should use this config

 


<context-param>


<param-name>javax.faces.STATE_SAVING_METHOD</param-name>


<param-value>client</param-value>

</context-param>

 

Which I dont like, but I tried it and then I get this exception

 

 

java.io.NotSerializableException: org.jboss.weld.bean.ManagedBean
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1164)
 java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 java.util.concurrent.ConcurrentHashMap.writeObject(ConcurrentHashMap.java:1246)
 sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:597)
 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
 java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
 java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 java.util.HashMap.writeObject(HashMap.java:1001)
 sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:597)
 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
 java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
 java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java:1518)
 java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1483)
 java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java:1346)
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1154)
 java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 java.util.HashMap.writeObject(HashMap.java:1001)
 sun.reflect.GeneratedMethodAccessor292.invoke(Unknown Source)
 sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 java.lang.reflect.Method.invoke(Method.java:597)
 java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java:940)
 java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java:1469)
 java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1400)
 java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1158)
 java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:330)
 com.sun.faces.renderkit.ClientSideStateHelper.doWriteState(ClientSideStateHelper.java:325)
 com.sun.faces.renderkit.ClientSideStateHelper.writeState(ClientSideStateHelper.java:173)
 com.sun.faces.renderkit.ResponseStateManagerImpl.writeState(ResponseStateManagerImpl.java:122)
 com.sun.faces.application.StateManagerImpl.writeState(StateManagerImpl.java:166)
 com.sun.faces.application.view.WriteBehindStateWriter.flushToWriter(WriteBehindStateWriter.java:225)
 com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:419)
 com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
 com.ocpsoft.pretty.faces.application.PrettyViewHandler.renderView(PrettyViewHandler.java:163)
 javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
 javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:288)
 com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:121)
 com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
 com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
 javax.faces.webapp.FacesServlet.service(FacesServlet.java:594)
 org.jboss.weld.servlet.ConversationPropagationFilter.doFilter(ConversationPropagationFilter.java:67)
 com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:126)
 org.jboss.solder.servlet.exception.CatchExceptionFilter.doFilter(CatchExceptionFilter.java:65)
 org.jboss.solder.servlet.event.ServletEventBridgeFilter.doFilter(ServletEventBridgeFilter.java:74)

 

 

So now it seems a dead end. Can @viewscoped beans be used on a clustered environment? Is there any other way around this? A jboss configuration on the cluster part? Another config in the application that I am missing?

 

Thanks

 

Kelly