3 Replies Latest reply: Sep 20, 2013 9:55 AM by DeHuaste RSS

    Error When Dismissing Many Dynamic Tabs

    DeHuaste

      Hi All,

       

      In the name of expanding knowledge, I bring another question.  We're using JDev/JHS 11.1.1.4 and our project is a migration from JHS 11.1.1.3.  This question relates to how JHeadStart deals with the open and close events associated with dynamic tabs.

       

      Our use case is that there are many top-level groups listed in a menu that can open as their own dynamic tab.  We support having multiple tabs open at once.  We're running into an issue where after closing multiple tabs quickly, we receive an error like the following:

       

      <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase APPLY_REQUEST_VALUES 2
      java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1)
          at java.util.SubList.<init>(AbstractList.java:604)
          at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
          at java.util.AbstractList.subList(AbstractList.java:468)
          at oracle.jheadstart.view.dyntab.DynTabTracker.getActiveTabList(DynTabTracker.java:158)
          at oracle.jheadstart.view.dyntab.DynTabContext.getMatchingTab(DynTabContext.java:354)
          at oracle.jheadstart.view.dyntab.DynTabContext.addOrSelectTab(DynTabContext.java:169)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchActivity(DynamicRegionManager.java:468)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchDynamicTabIfNeeded(DynamicRegionManager.java:505)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.setCurrentTaskFlowName(DynamicRegionManager.java:225)
          at oracle.jheadstart.controller.jsf.application.JhsNavigationHandlerImpl.handleNavigation(JhsNavigationHandlerImpl.java:142)
          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
          at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
          at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
          at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:232)
          at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:248)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:356)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
          at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.jheadstart.controller.jsf.AuthenticationFilter.doFilter(AuthenticationFilter.java:282)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
          at java.security.AccessController.doPrivileged(Native Method)
          at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
          at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
          at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
          at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
          at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
      <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
      java.lang.IllegalArgumentException: fromIndex(0) > toIndex(-1)
          at java.util.SubList.<init>(AbstractList.java:604)
          at java.util.RandomAccessSubList.<init>(AbstractList.java:758)
          at java.util.AbstractList.subList(AbstractList.java:468)
          at oracle.jheadstart.view.dyntab.DynTabTracker.getActiveTabList(DynTabTracker.java:158)
          at oracle.jheadstart.view.dyntab.DynTabContext.getMatchingTab(DynTabContext.java:354)
          at oracle.jheadstart.view.dyntab.DynTabContext.addOrSelectTab(DynTabContext.java:169)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchActivity(DynamicRegionManager.java:468)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchDynamicTabIfNeeded(DynamicRegionManager.java:505)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.setCurrentTaskFlowName(DynamicRegionManager.java:225)
          at oracle.jheadstart.controller.jsf.application.JhsNavigationHandlerImpl.handleNavigation(JhsNavigationHandlerImpl.java:142)
          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
          at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
          at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
          at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:232)
          at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:248)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:356)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
          at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.jheadstart.controller.jsf.AuthenticationFilter.doFilter(AuthenticationFilter.java:282)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
          at java.security.AccessController.doPrivileged(Native Method)
          at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
          at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
          at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
          at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
          at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
      
      

       

      Based on what I've seen, the number of active tabs gets decremented before the tab is actually closed.  This sometimes requires closing a tab more than once (which decrements the number of active tabs to less than 0).  Then, when trying to open a new tab, the number of active tabs is passed as an argument to the subList mentioned in the above stack.  If the number is less than 0, the above exception occurs.

       

      The following is a variation on the above, the only difference is if you dismiss all but one tab, then attempt to open a new one, the following error is thrown.

       

      
      <LifecycleImpl> <_handleException> ADF_FACES-60098:Faces lifecycle receives unhandled exceptions in phase APPLY_REQUEST_VALUES 2
      java.lang.IllegalStateException: TabList state is corrupted!
          at oracle.jheadstart.view.dyntab.DynTabContext.getFirstInactiveTabOrThrow(DynTabContext.java:252)
          at oracle.jheadstart.view.dyntab.DynTabContext.addTab(DynTabContext.java:221)
          at oracle.jheadstart.view.dyntab.DynTabContext.addOrSelectTab(DynTabContext.java:180)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchActivity(DynamicRegionManager.java:468)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchDynamicTabIfNeeded(DynamicRegionManager.java:505)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.setCurrentTaskFlowName(DynamicRegionManager.java:225)
          at oracle.jheadstart.controller.jsf.application.JhsNavigationHandlerImpl.handleNavigation(JhsNavigationHandlerImpl.java:142)
          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
          at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
          at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
          at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:232)
          at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:248)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:356)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
          at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.jheadstart.controller.jsf.AuthenticationFilter.doFilter(AuthenticationFilter.java:282)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
          at java.security.AccessController.doPrivileged(Native Method)
          at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
          at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
          at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
          at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
          at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
      <RegistrationConfigurator> <handleError> ADF_FACES-60096:Server Exception during PPR, #1
      java.lang.IllegalStateException: TabList state is corrupted!
          at oracle.jheadstart.view.dyntab.DynTabContext.getFirstInactiveTabOrThrow(DynTabContext.java:252)
          at oracle.jheadstart.view.dyntab.DynTabContext.addTab(DynTabContext.java:221)
          at oracle.jheadstart.view.dyntab.DynTabContext.addOrSelectTab(DynTabContext.java:180)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchActivity(DynamicRegionManager.java:468)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.launchDynamicTabIfNeeded(DynamicRegionManager.java:505)
          at oracle.jheadstart.controller.jsf.bean.DynamicRegionManager.setCurrentTaskFlowName(DynamicRegionManager.java:225)
          at oracle.jheadstart.controller.jsf.application.JhsNavigationHandlerImpl.handleNavigation(JhsNavigationHandlerImpl.java:142)
          at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:130)
          at org.apache.myfaces.trinidad.component.UIXCommand.broadcast(UIXCommand.java:190)
          at org.apache.myfaces.trinidad.component.UIXCollection.broadcast(UIXCollection.java:148)
          at org.apache.myfaces.trinidad.component.UIXTree.broadcast(UIXTree.java:232)
          at oracle.adf.view.rich.component.rich.data.RichTree.broadcast(RichTree.java:248)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:102)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent$1.run(ContextSwitchingComponent.java:92)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent._processPhase(ContextSwitchingComponent.java:361)
          at oracle.adf.view.rich.component.fragment.ContextSwitchingComponent.broadcast(ContextSwitchingComponent.java:96)
          at oracle.adf.view.rich.component.fragment.UIXInclude.broadcast(UIXInclude.java:96)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.broadcastEvents(LifecycleImpl.java:879)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl._executePhase(LifecycleImpl.java:356)
          at oracle.adfinternal.view.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:185)
          at javax.faces.webapp.FacesServlet.service(FacesServlet.java:265)
          at weblogic.servlet.internal.StubSecurityHelper$ServletServiceAction.run(StubSecurityHelper.java:227)
          at weblogic.servlet.internal.StubSecurityHelper.invokeServlet(StubSecurityHelper.java:125)
          at weblogic.servlet.internal.ServletStubImpl.execute(ServletStubImpl.java:300)
          at weblogic.servlet.internal.TailFilter.doFilter(TailFilter.java:26)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.model.servlet.ADFBindingFilter.doFilter(ADFBindingFilter.java:205)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adfinternal.view.faces.webapp.rich.RegistrationFilter.doFilter(RegistrationFilter.java:106)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at oracle.adfinternal.view.faces.activedata.AdsFilter.doFilter(AdsFilter.java:60)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl$FilterListChain.doFilter(TrinidadFilterImpl.java:446)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl._doFilterImpl(TrinidadFilterImpl.java:271)
          at org.apache.myfaces.trinidadinternal.webapp.TrinidadFilterImpl.doFilter(TrinidadFilterImpl.java:177)
          at org.apache.myfaces.trinidad.webapp.TrinidadFilter.doFilter(TrinidadFilter.java:92)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.adf.library.webapp.LibraryFilter.doFilter(LibraryFilter.java:175)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.jheadstart.controller.jsf.AuthenticationFilter.doFilter(AuthenticationFilter.java:282)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.security.jps.ee.http.JpsAbsFilter$1.run(JpsAbsFilter.java:111)
          at java.security.AccessController.doPrivileged(Native Method)
          at oracle.security.jps.util.JpsSubject.doAsPrivileged(JpsSubject.java:313)
          at oracle.security.jps.ee.util.JpsPlatformUtil.runJaasMode(JpsPlatformUtil.java:413)
          at oracle.security.jps.ee.http.JpsAbsFilter.runJaasMode(JpsAbsFilter.java:94)
          at oracle.security.jps.ee.http.JpsAbsFilter.doFilter(JpsAbsFilter.java:161)
          at oracle.security.jps.ee.http.JpsFilter.doFilter(JpsFilter.java:71)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at oracle.dms.servlet.DMSServletFilter.doFilter(DMSServletFilter.java:136)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.RequestEventsFilter.doFilter(RequestEventsFilter.java:27)
          at weblogic.servlet.internal.FilterChainImpl.doFilter(FilterChainImpl.java:56)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.wrapRun(WebAppServletContext.java:3715)
          at weblogic.servlet.internal.WebAppServletContext$ServletInvocationAction.run(WebAppServletContext.java:3681)
          at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:321)
          at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:120)
          at weblogic.servlet.internal.WebAppServletContext.securedExecute(WebAppServletContext.java:2277)
          at weblogic.servlet.internal.WebAppServletContext.execute(WebAppServletContext.java:2183)
          at weblogic.servlet.internal.ServletRequestImpl.run(ServletRequestImpl.java:1454)
          at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
          at weblogic.work.ExecuteThread.run(ExecuteThread.java:176)
      

       

       

      There's not much info on this out there and it seems to pertain to internal libraries so I thought I'd ask for guidance here.  My first thought was to override the method that passes the number of active tabs to catch if the value is less than zero, but that doesn't account for the second instance.  Has anyone run into this before?

       

      Many thanks,

        • 1. Re: Error When Dismissing Many Dynamic Tabs
          DeHuaste

          After considerable effort, we've found a solution should anyone else encounter this error.  This code simply ensures that the tab still has a unique identifier and if so, removes the tab from the active list. 

           

          Note: If your system performs well, you might not ever encounter this error.  But it can be recreated with ease by turning on lots of logging or by setting a breakpoint in one of the removeTab methods in the JHS DynTabContext class.

           

          public class CustomDynTabContext extends DynTabContext {
              public CustomsDynTabContext() {
                  super();
              }
              
          
              @Override
              protected void removeTab(DynTab tab, boolean force) {
          
                  //Need to first check if tab is already null,
                  //this prevents tabList from becoming corrupt
                  if (tab.getUniqueIdentifier() != null) {
                      super.removeTab(tab, force);
                  }
              }
          }
          
          • 2. Re: Error When Dismissing Many Dynamic Tabs
            Steven Davelaar-Oracle

            Thanks for all the effort you put into this to get it resolved.

            We'll consider adding your fix to next JHeadstart release. However, can you explain why this fixes the problem? Did you add code somewhere else to clear the unique identifier? As a tab unique identifier is not required, I am not sure this fixes the problem in all cases.


            Steven Davelaar,

            JHeadstart Team.

            • 3. Re: Error When Dismissing Many Dynamic Tabs
              DeHuaste

              Hi Steven,

               

              I can only take credit for your suspicion :)

               

              Your concern was raised on our end as well.  The tab unique identifier is cleared in the base class from which our override stems...

               

                  tab.setTaskflowId(getEmptyTaskFlowId());
                  tab.setParameters(null);
                  tab.setUniqueIdentifier(null);
                  tab.setTitle("");
                  tab.setActive(false);
                  tab.setActivated(false);
              
              

               

              From my observations, it seemed that the Tab Unique Identifier inherited its value from the group name if one was not present (which is why I felt the fix worked).  Is this not so?  In either case, we saw that the error was preceded by null tabs being passed into the method, which would decrement numActive but leave the same tabs open in the UI.  Hence when finally closing all the tabs, index would be an undesirable value like -1, -2, etc..

               

              Thanks,