I think it is the session expired and i need a filter.
BaTien DBGROUPS =================
dbgroups wrote:
Greetings:
I recently discover a strange problem concerning the resolving of bean initialized by Spring IoC and myfaces.
background:
1) Jsf managed beans are used to initialized under session scope all Jsf UI components, connected to a single Jsf portalTabbedBean.
2) The portalTabRenderer will discover if portalTabbedBean.portalProcessor is null. If it is, this is the first time user and the portalProcessor is created using Spring IoC with singleton="false". The portalProcessor is responsible to pass request to othe backend containers assembled via Spring IoC. I have not used Spring feature to turn its IoC beans accessible to Jsf yet.
Everything works fine. If the browser is in-active for a certain period (close to 30 min), a click of any jsf commandButton or commandLink that require actionListener and/or action will fail due to un-able to resolve the attached IoC bean as indicated in following log. I also attach a log with some more information.
Can any one shed some light on this? I appreciate and thank all suggestions from this active community.
BaTien DBGROUPS
2005-03-10 14:49:21,884 [http-80-Processor25] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Invoking BeanPostProcessors after initialization of bean 'portalProcessor'
2005-03-10 15:28:46,092 [http-80-Processor23] WARN org.apache.myfaces.el.VariableResolverImpl - Variable 'portalProcessor' could not be resolved.
2005-03-10 15:28:46,118 [http-80-Processor23] ERROR org.apache.myfaces.el.MethodBindingImpl - Exception while invoking expression #{catBean.processPortletMenu}
com.dbgroups.psi.baf.ProcessException: Cat processPortletMenu cannot handle request: java.lang.NullPointerException
at com.dbgroups.psi.models.CatBean.processPortletMenu(CatBean.java:170)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
------------------------------------------------------------------------
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Expression: #{catBean.processPortletMenu} javax.faces.webapp.FacesServlet.service(FacesServlet.java:125)
root cause
javax.faces.el.EvaluationException: Expression: #{catBean.processPortletMenu} org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:164) javax.faces.component.UICommand.broadcast(UICommand.java:86) javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:110) javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:184) org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:259) org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
note The full stack trace of the root cause is available in the Apache Tomcat/5.0.28 logs. ===============
2005-03-10 14:49:21,883 [http-80-Processor25] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Invoking BeanPostProcessors before initialization of bean 'portalProcessor' 2005-03-10 14:49:21,884 [http-80-Processor25] DEBUG org.springframework.beans.factory.support.DefaultListableBeanFactory - Invoking BeanPostProcessors after initialization of bean 'portalProcessor' 2005-03-10 15:28:46,092 [http-80-Processor23] WARN org.apache.myfaces.el.VariableResolverImpl - Variable 'portalProcessor' could not be resolved. 2005-03-10 15:28:46,118 [http-80-Processor23] ERROR org.apache.myfaces.el.MethodBindingImpl - Exception while invoking expression #{catBean.processPortletMenu} com.dbgroups.psi.baf.ProcessException: Cat processPortletMenu cannot handle request: java.lang.NullPointerException at com.dbgroups.psi.models.CatBean.processPortletMenu(CatBean.java:170) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:324) at org.apache.myfaces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:138) at javax.faces.component.UICommand.broadcast(UICommand.java:86) at javax.faces.component.UIViewRoot._broadcastForPhase(UIViewRoot.java:110) at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:184) at org.apache.myfaces.lifecycle.LifecycleImpl.invokeApplication(LifecycleImpl.java:259) at org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90) at javax.faces.webapp.FacesServlet.service(FacesServlet.java:109)
===========================
<context-param> <param-name>javax.faces.STATE_SAVING_METHOD</param-name> <param-value>client</param-value> </context-param> =============================
public Object saveState(FacesContext context) { Object values[] = new Object[4]; values[0] = super.saveState(context); values[1] = selectedIndex; values[2] = oldSelectedIndex; values[3] = saveAttachedState(context, tabChangeListener);
return ((Object) (values)); } ===================================
<session-config>
<session-timeout>30</session-timeout>
</session-config>

