0 Replies Latest reply on Feb 27, 2009 6:27 PM by raffaele camanzo

    StackOverflowError random exception

    raffaele camanzo Newbie
      Hi all,

      I'm actually facing a very strange behaviour. Worst because it is happening in the production environment.

      Scenario:
      "Sometimes" during login my app throws this exception:


      2009-02-27 15:02:45,143 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] beginning transaction prior to phase: RESTORE_VIEW 1
      2009-02-27 15:02:45,143 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA transaction
      2009-02-27 15:02:45,144 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase RESTORE_VIEW 1
      2009-02-27 15:02:45,144 DEBUG [org.ajax4jsf.application.AjaxStateHolder] Request for a view states holder instance
      2009-02-27 15:02:45,144 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RESTORE_VIEW 1
      2009-02-27 15:02:45,144 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase APPLY_REQUEST_VALUES 2
      2009-02-27 15:02:45,144 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase APPLY_REQUEST_VALUES 2
      2009-02-27 15:02:45,145 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase PROCESS_VALIDATIONS 3
      2009-02-27 15:02:45,145 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase PROCESS_VALIDATIONS 3
      2009-02-27 15:02:45,145 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase UPDATE_MODEL_VALUES 4
      2009-02-27 15:02:45,145 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase UPDATE_MODEL_VALUES 4
      2009-02-27 15:02:45,146 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase INVOKE_APPLICATION 5
      2009-02-27 15:02:45,158 INFO  [it.finservice.odino.core.OdinoAuthenticator] <OdinoAuthenticator> TROVATO RUOLO 'CLIENTE' PER UTENTE: 'c1544'
      2009-02-27 15:02:45,158 INFO  [it.finservice.odino.core.OdinoAuthenticator] <OdinoAuthenticator> TROVATO RUOLO 'CONNECT' PER UTENTE: 'c1544'
      2009-02-27 15:02:45,158 INFO  [it.finservice.odino.core.OdinoAuthenticator] <OdinoAuthenticator> AUTENTICAZIONE COMPLETATA CORRETTAMENTE! USERNAME 'c1544'
      2009-02-27 15:02:45,159 DEBUG [org.jboss.seam.security.Identity] Login successful for: c1544
      2009-02-27 15:02:45,159 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase INVOKE_APPLICATION 5
      2009-02-27 15:02:45,159 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: INVOKE_APPLICATION 5
      2009-02-27 15:02:45,159 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
      2009-02-27 15:02:45,160 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] beginning transaction prior to phase: RENDER_RESPONSE 6
      2009-02-27 15:02:45,160 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA transaction
      2009-02-27 15:02:45,161 DEBUG [org.jboss.seam.persistence.ManagedPersistenceContext] created seam managed persistence context for persistence unit: java:/odinoFlashEntityManag
      erFactory
      2009-02-27 15:02:45,161 DEBUG [it.finservice.odino.core.OdinoSessionHandler] bindAddress: 0.0.0.0
      2009-02-27 15:02:45,162 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Estrazione dati utente per utente: c1544
      2009-02-27 15:02:45,169 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Inizializzazione utente con ruolo: CLIENTE
      2009-02-27 15:02:45,171 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Azione 'RIEPILOGOPRATICA' abilitata per ruolo: CLIENTE
      2009-02-27 15:02:45,171 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Azione 'MESSAGGICLIENTE' abilitata per ruolo: CLIENTE
      2009-02-27 15:02:45,171 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Azione 'REGISTRAZIONEINCASSI' abilitata per ruolo: CLIENTE
      2009-02-27 15:02:45,172 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Azione 'PANNELLOCLIENTE' abilitata per ruolo: CLIENTE
      2009-02-27 15:02:45,172 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Azione 'PRATICAINTERATTIVA' abilitata per ruolo: CLIENTE
      2009-02-27 15:02:45,172 DEBUG [it.finservice.odino.core.OdinoUser] <OdinoUser.init> Azione 'CALENDARIOATTIVITA' abilitata per ruolo: CLIENTE
      2009-02-27 15:02:45,172 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> INITIALIZING CALENDAR
      2009-02-27 15:02:45,176 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> CUR MONTH: Febbraio - CUR YEAR: 2009 - CUR DAY: 23
      2009-02-27 15:02:45,176 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> CUR MONTH: Febbraio - CUR YEAR: 2009 - CUR DAY: 2
      2009-02-27 15:02:45,192 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> CUR MONTH: Febbraio - CUR YEAR: 2009 - CUR DAY: 9
      2009-02-27 15:02:45,208 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> CUR MONTH: Febbraio - CUR YEAR: 2009 - CUR DAY: 16
      2009-02-27 15:02:45,230 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> CUR MONTH: Febbraio - CUR YEAR: 2009 - CUR DAY: 23
      2009-02-27 15:02:45,247 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> CUR MONTH: Febbraio - CUR YEAR: 2009 - CUR DAY: 2
      2009-02-27 15:02:45,264 DEBUG [it.finservice.odino.core.calendario.OdinoCalendar] <OdinoCalendar> >>>>>>>>> REFRESHING CALENDAR ACTIVITY INFO <<<<<<<<<<<<<
      2009-02-27 15:02:45,346 DEBUG [it.finservice.odino.core.OdinoSessionHandler] <OdinoSessionHandler.initView> Ridirezione su vista: /messaggiCliente.xhtml, impostando conversati
      onId: 353
      2009-02-27 15:02:45,346 DEBUG [org.jboss.seam.faces.FacesManager] redirecting to: /crc/messaggiCliente.seam?conversationId=353
      2009-02-27 15:02:45,346 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: INVOKE_APPLICATION 5
      2009-02-27 15:02:45,346 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
      2009-02-27 15:02:45,347 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase RENDER_RESPONSE 6
      2009-02-27 15:02:45,347 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] PhaseListener enter Before RenderView Phase with ViewId /login.xhtml and RenderKitId HTML_BASIC
      2009-02-27 15:02:45,347 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RENDER_RESPONSE 6
      2009-02-27 15:02:45,358 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] beginning transaction prior to phase: RESTORE_VIEW 1
      2009-02-27 15:02:45,358 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA transaction
      2009-02-27 15:02:45,358 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase RESTORE_VIEW 1
      2009-02-27 15:02:45,358 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RESTORE_VIEW 1
      2009-02-27 15:02:45,358 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: RESTORE_VIEW 1
      2009-02-27 15:02:45,359 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
      2009-02-27 15:02:45,359 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] beginning transaction prior to phase: RENDER_RESPONSE 6
      2009-02-27 15:02:45,359 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA transaction
      2009-02-27 15:02:45,360 DEBUG [it.finservice.odino.core.OdinoSessionHandler] <OdinoSessionHandler.initAction> inizializzazione action: messaggiCliente - conversation: 353
      2009-02-27 15:02:45,360 DEBUG [it.finservice.odino.core.OdinoSessionHandler] <OdinoSessionHandler.initAction> componente non presente, init dell'action
      2009-02-27 15:02:45,362 DEBUG [it.finservice.odino.core.messaggi.filters.ClienteMessageFilter] <CalendarMessageFilter> Estrazione messaggi per soggetto cliente: TRAPANI SIMONA
      2009-02-27 15:02:45,363 DEBUG [it.finservice.odino.application.actions.messaggiCliente.MessaggiClienteAction] <AbstractAction> Inizializzazione. Current conversationId: 353
      2009-02-27 15:02:45,364 DEBUG [it.finservice.odino.core.messaggi.filters.ClienteMessageFilter] <CalendarMessageFilter> Estrazione messaggi vecchi per utente: TRAPANI SIMONA
      2009-02-27 15:02:45,366 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: INVOKE_APPLICATION 5
      2009-02-27 15:02:45,366 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
      2009-02-27 15:02:45,367 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] beginning transaction prior to phase: INVOKE_APPLICATION 5
      2009-02-27 15:02:45,367 DEBUG [org.jboss.seam.transaction.UTTransaction] beginning JTA transaction
      2009-02-27 15:02:45,367 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process before phase RENDER_RESPONSE 6
      2009-02-27 15:02:45,367 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] PhaseListener enter Before RenderView Phase with ViewId /messaggiCliente.xhtml and RenderKitId HTML_BASIC
      2009-02-27 15:02:46,059 DEBUG [org.ajax4jsf.event.AjaxPhaseListener] Process after phase RENDER_RESPONSE 6
      2009-02-27 15:02:46,059 DEBUG [org.jboss.seam.jsf.SeamPhaseListener] committing transaction after phase: RENDER_RESPONSE 6
      2009-02-27 15:02:46,060 DEBUG [org.jboss.seam.transaction.UTTransaction] committing JTA transaction
      2009-02-27 15:02:46,060 ERROR [org.jboss.seam.web.ExceptionFilter] handling uncaught exception
      javax.servlet.ServletException: Servlet execution threw an exception
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:313)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:532)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:83)
              at org.jboss.seam.web.MultipartFilter.doFilter(MultipartFilter.java:85)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.ajax4jsf.webapp.BaseXMLFilter.doXmlFilter(BaseXMLFilter.java:178)
              at org.ajax4jsf.webapp.BaseFilter.handleRequest(BaseFilter.java:290)
              at org.ajax4jsf.webapp.BaseFilter.processUploadsAndHandleRequest(BaseFilter.java:390)
              at org.ajax4jsf.webapp.BaseFilter.doFilter(BaseFilter.java:517)
              at org.jboss.seam.web.Ajax4jsfFilter.doFilter(Ajax4jsfFilter.java:60)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.web.LoggingFilter.doFilter(LoggingFilter.java:58)
              at org.jboss.seam.servlet.SeamFilter$FilterChainImpl.doFilter(SeamFilter.java:69)
              at org.jboss.seam.servlet.SeamFilter.doFilter(SeamFilter.java:158)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.web.ExceptionFilter.doFilter(ExceptionFilter.java:64)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.seam.web.RedirectFilter.doFilter(RedirectFilter.java:45)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:96)
              at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
              at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
              at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:230)
              at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:175)
              at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:182)
              at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:432)
              at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:84)
              at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
              at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
              at org.jboss.web.tomcat.service.jca.CachedConnectionValve.invoke(CachedConnectionValve.java:157)
              at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
              at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:262)
              at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:844)
              at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
              at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:446)
              at java.lang.Thread.run(Thread.java:595)
      Caused by: java.lang.StackOverflowError
              at org.jboss.seam.core.Events.raiseEvent(Events.java:61)
              at org.jboss.seam.contexts.BasicContext.set(BasicContext.java:81)
              at org.jboss.seam.core.MethodContextInterceptor.aroundInvoke(MethodContextInterceptor.java:37)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.persistence.EntityManagerProxyInterceptor.aroundInvoke(EntityManagerProxyInterceptor.java:26)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.persistence.HibernateSessionProxyInterceptor.aroundInvoke(HibernateSessionProxyInterceptor.java:27)
              at org.jboss.seam.intercept.SeamInvocationContext.proceed(SeamInvocationContext.java:68)
              at org.jboss.seam.intercept.RootInterceptor.invoke(RootInterceptor.java:107)
              at org.jboss.seam.intercept.SessionBeanInterceptor.aroundInvoke(SessionBeanInterceptor.java:50)
              at sun.reflect.GeneratedMethodAccessor160.invoke(Unknown Source)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
              at java.lang.reflect.Method.invoke(Method.java:585)
              at org.jboss.ejb3.interceptor.InvocationContextImpl.proceed(InvocationContextImpl.java:118)
              at org.jboss.ejb3.interceptor.EJB3InterceptorsInterceptor.invoke(EJB3InterceptorsInterceptor.java:63)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.entity.ExtendedPersistenceContextPropagationInterceptor.invoke(ExtendedPersistenceContextPropagationInterceptor.java:57)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.entity.TransactionScopedEntityManagerInterceptor.invoke(TransactionScopedEntityManagerInterceptor.java:54)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.AllowedOperationsInterceptor.invoke(AllowedOperationsInterceptor.java:47)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPolicy.invokeInCallerTx(TxPolicy.java:126)
              at org.jboss.aspects.tx.TxInterceptor$Required.invoke(TxInterceptor.java:195)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.aspects.tx.TxPropagationInterceptor.invoke(TxPropagationInterceptor.java:95)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
              at org.jboss.ejb3.stateful.StatefulInstanceInterceptor.invoke(StatefulInstanceInterceptor.java:83)
              at org.jboss.aop.joinpoint.MethodInvocation.invokeNext(MethodInvocation.java:101)
      2009-02-27 15:02:46,061 ERROR [org.jboss.seam.web.ExceptionFilter] exception root cause
      2009-02-27 15:02:46,061 DEBUG [org.jboss.seam.web.ExceptionFilter] running exception handlers
      2009-02-27 15:02:46,061 DEBUG [org.jboss.seam.faces.Navigator] redirecting to: /error.xhtml
      2009-02-27 15:02:46,061 DEBUG [org.jboss.seam.faces.FacesManager] redirecting to: /crc/error.seam?conversationId=353
      2009-02-27 15:02:46,062 DEBUG [org.jboss.seam.web.ExceptionFilter] done running exception handlers



      this error is absolutely random..
      I don't understand what's wrong with my code, indeed, in invoke application phase everything seems to work properly, but the render phase...



      Environment:
      jBoss AS 4.2.3.GA
      jBoss Seam 2.0.3.CR1
      Facelets 1.1.14
      JSF 1.2_11
      Richfaces 3.3.0


      - pages.xml

      `
           <page view-id="/login.xhtml">
                <action if="#{identity.loggedIn}" execute="#{sessionHandler.initView}" />
           </page>
           
           <page view-id="/logout.xhtml">
                <action execute="#{identity.logout}"/>
           </page>

           <page login-required="true" view-id="/expired.xhtml"/>

           <page login-required="true" view-id="/main.xhtml"/>

           <page login-required="true" view-id="/error.xhtml"/>
           
           <page login-required="true" view-id="/calendarioAttivita.xhtml"
                no-conversation-view-id="/login.xhtml">

                <action execute="#{sessionHandler.initAction}"/>
           </page>

           <page login-required="true" view-id="/configuraRuoli.xhtml"
                no-conversation-view-id="/login.xhtml">

                <action execute="#{sessionHandler.initAction}"/>
           </page>
                
           <page login-required="true" view-id="/configuraZone.xhtml"
                no-conversation-view-id="/login.xhtml">

                <action execute="#{sessionHandler.initAction}"/>
           </page>
                
      ...
      `



      - session handler


      @Stateful
      @Name(OdinoSessionHandler.COMPONENT)
      @Scope(ScopeType.SESSION)
      @Restrict("#{identity.loggedIn}")
      public class OdinoSessionHandler implements Serializable, OdinoSessionHandlerInterface {

           private static final long serialVersionUID = -7673872822792447787L;
           
           public static final String COMPONENT = "sessionHandler";

      ...

           public void initView() throws Exception {
                ActionEnumInterface actionConfig = null;
                String action = null;
                String businessKey = null;
                String label = null;
                String contextLabel = null;
                
                timeZone = OdinoUtils.TIME_ZONE;
                datePattern = OdinoUtils.DATE_PATTERN;

                navigationAperta = true;
                fileNavigation = FILE_NAVIGATION_APERTA;

                bindAddress = System.getProperty("jboss.bind.address");
                log.debug("bindAddress: #0", bindAddress);

                // Inizializzazione dell'utente
                if(currentUser.init()) {
                
                    // Inizializzazione del calendario
                    OdinoCalendarInterface calendar = (OdinoCalendarInterface) Component.getInstance(OdinoCalendar.COMPONENT);
                    calendar.create();
         
                    if(currentUser.isCliente()) {
                         
                         actionConfig = currentUser.getActionConfig(MessaggiClienteAction.NAME);
                         action = actionConfig.name();
                         ActionLoaderData data = invoke(actionConfig.getLoader(), actionConfig);
                         businessKey = data.getBusinessKey();
                         label = data.getLabel();
                         contextLabel = data.getContextLabel();
                    } else if(currentUser.isSupervisore()) {
         
                         actionConfig = currentUser.getActionConfig(PannelloSupervisoreAction.NAME);
                         action = actionConfig.name();
                         ActionLoaderData data = invoke(actionConfig.getLoader(), actionConfig);
                         businessKey = data.getBusinessKey();
                         label = data.getLabel();
                         contextLabel = data.getContextLabel();
                    } else {
         
                         actionConfig = currentUser.getActionConfig(CalendarioAttivitaAction.NAME);
                         action = actionConfig.name();
                         ActionLoaderData data = invoke(actionConfig.getLoader(), actionConfig);
                         businessKey = data.getBusinessKey();
                         label = data.getLabel();
                         contextLabel = data.getContextLabel();
                    }
                    
                    ContextData contextData = new ContextData();
                    contextData.setLabel(contextLabel);
                    contextData.setSelected(true);
         
                    TabData tabData = new TabData();
                    tabData.setAction(action);
                    tabData.setBusinessKey(businessKey);
                    tabData.setContextLabel(contextLabel);
                    tabData.setConversationId(Conversation.instance().getId());
                    tabData.setLabel(label);
                    tabData.setSelected(true);
                    tabData.setInit(true);
         
                    contextData.getTabDataMap().put(businessKey, tabData);
                    contextDataMap.put(contextLabel, contextData);
         
                    contextData.setCurrentTabRef(tabData);
                    currentTab = tabData;
         
                    // Updating the reference to the current context
                    currentContext = contextData;
                    
                    calendar.refreshCalendar();
         
                    // Inizio prima conversazione
                    Conversation.instance().begin();
                    
                    Redirect.instance().setViewId(actionConfig.getXhtml());
                    Redirect.instance().setConversationPropagationEnabled(false);
                    Redirect.instance().setParameter("conversationId", currentTab.getConversationId());
                    log.debug("<OdinoSessionHandler.initView> Ridirezione su vista: #0, impostando conversationId: #1", actionConfig.getXhtml(), currentTab.getConversationId());
                    Redirect.instance().execute();
                } else {
                     Identity.instance().logout();
                }
           }

      ......

           public void initAction() throws Exception {
                if(currentTab != null) {
                     // Aggiornamento timestamp di scadenza del tab
                     currentTab.setTimestamp(new Date());
                     if(currentTab.isInit()) {
                          // Removing welcome message
                          FacesMessages.instance().clear();
                         currentTab.setInit(false);
                         
                         String componentName = currentUser.getActionConfig(currentTab.getAction()).getComponentName();
                         log.debug("<OdinoSessionHandler.initAction> inizializzazione action: #0 - conversation: #1", componentName, Conversation.instance().getId());
                         // Verifico se esiste o meno la componente seam dell'azione nel contesto di conversazione
                         if(Contexts.getConversationContext().isSet(componentName)) {
                              log.debug("<OdinoSessionHandler.initAction> componente gia' presente, refresh dell'action");
                              // Questo e' un refresh
                              ActionInterface component = (ActionInterface) Component.getInstance(componentName);
                              component.refresh();
                         } else {
                              log.debug("<OdinoSessionHandler.initAction> componente non presente, init dell'action");
                              // Questa e' la chiamata alla creazione della conversazione dell'action
                              ActionInterface component = (ActionInterface) Component.getInstance(componentName);
                              component.begin();
                         }
                     }
                } else {
                     log.debug("<OdinoSessionHandler.initAction> current tab non presente, qualcosa non va'");
                }
           }

      .......


      Basically this is the behaviour:

      The user logs in through login.xhtml, after the authentication the pages.xml calls sessionHandler.initView in order to load the application and decide the starting view for the logged user redirecting on it. pages.xml is reached again and sessionHandler.initAction is called in order to execute action specific code.

      It seems to be quite simple but "sometimes(!?!)" it breaks. You can imagine the reactions.

      One last question: can be the stack size too small? Do you think I can solve my problem increasing stack size handling the 'xss' option in run.sh?

      Any help is really appreciated!
      Regards,
      Raffaele Camanzo