ICEfaces
  1. ICEfaces
  2. ICE-11101

CLONE - Cannot add the same component twice: javax_faces_location_HEAD

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: EE-3.3.0.GA_P03
    • Fix Version/s: EE-3.3.0.GA_P04
    • Component/s: Framework
    • Labels:
      None
    • Environment:
      ICEfaces EE 3.3.0 P03 and recent. Mojarra 2.1.28, 2.1.29-04
    • Assignee Priority:
      P1
    • Support Case References:
    • Workaround Exists:
      Yes
    • Workaround Description:
      Hide
      Turn off Partial State saving:

          <context-param>
              <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>
              <param-value>false</param-value>
          </context-param>
      Show
      Turn off Partial State saving:     <context-param>         <param-name>javax.faces.PARTIAL_STATE_SAVING</param-name>         <param-value>false</param-value>     </context-param>

      Description

      This issue is the same as reported in ICE-10641

      When using dynamin ui:includes for navigation/displaying content. After loading some content, navigating, then loading the previous page/content, the following error is thrown:

      12-Jul-2016 10:37:53.008 SEVERE [http-nio-8084-exec-1] com.sun.faces.context.AjaxExceptionHandlerImpl.handlePartialResponseError javax.faces.FacesException: Cannot add the same component twice: javax_faces_location_HEAD
      at com.sun.faces.context.StateContext$DynamicAddRemoveListener.handleAddRemoveWithAutoPrune(StateContext.java:751)
      at com.sun.faces.context.StateContext$DynamicAddRemoveListener.handleAdd(StateContext.java:667)
      at com.sun.faces.context.StateContext$AddRemoveListener.processEvent(StateContext.java:352)
      at com.sun.faces.context.StateContext$DynamicAddRemoveListener.processEvent(StateContext.java:568)
      at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
      at com.sun.faces.application.ApplicationImpl.processListenersAccountingForAdds(ApplicationImpl.java:2215)
      at com.sun.faces.application.ApplicationImpl.invokeViewListenersFor(ApplicationImpl.java:2033)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:292)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
      at javax.faces.component.UIComponentBase.publishAfterViewEvents(UIComponentBase.java:2203)
      at javax.faces.component.UIComponentBase.doPostAddProcessing(UIComponentBase.java:1885)
      at javax.faces.component.UIComponentBase.setParent(UIComponentBase.java:405)
      at javax.faces.component.UIComponentBase$FacetsMap.put(UIComponentBase.java:2943)
      at javax.faces.component.UIComponentBase$FacetsMap.put(UIComponentBase.java:2903)
      at javax.faces.component.UIViewRoot.getComponentResources(UIViewRoot.java:1749)
      at javax.faces.component.UIViewRoot.addComponentResource(UIViewRoot.java:517)
      at org.icefaces.impl.event.RestoreResourceDependencies.addResourceDependency(RestoreResourceDependencies.java:110)
      at org.icefaces.impl.event.RestoreResourceDependencies.collectResourceDependencies(RestoreResourceDependencies.java:76)
      at org.icefaces.impl.event.RestoreResourceDependencies.access$000(RestoreResourceDependencies.java:37)
      at org.icefaces.impl.event.RestoreResourceDependencies$1.visit(RestoreResourceDependencies.java:49)
      at com.sun.faces.component.visit.FullVisitContext.invokeVisitCallback(FullVisitContext.java:151)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1611)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1622)
      at javax.faces.component.UIForm.visitTree(UIForm.java:371)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1622)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1622)
      at javax.faces.component.UIComponent.visitTree(UIComponent.java:1622)
      at org.icefaces.impl.event.RestoreResourceDependencies.processEvent(RestoreResourceDependencies.java:47)
      at javax.faces.event.SystemEvent.processListener(SystemEvent.java:106)
      at com.sun.faces.application.ApplicationImpl.processListeners(ApplicationImpl.java:2166)
      at com.sun.faces.application.ApplicationImpl.invokeListenersFor(ApplicationImpl.java:2139)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:303)
      at com.sun.faces.application.ApplicationImpl.publishEvent(ApplicationImpl.java:247)
      at javax.faces.component.UIComponentBase.encodeBegin(UIComponentBase.java:814)
      at javax.faces.component.UIViewRoot.encodeBegin(UIViewRoot.java:954)
      at javax.faces.component.UIComponent.encodeAll(UIComponent.java:1776)
      at com.sun.faces.application.view.FaceletViewHandlingStrategy.renderView(FaceletViewHandlingStrategy.java:426)
      at com.sun.faces.application.view.MultiViewHandler.renderView(MultiViewHandler.java:125)
      at javax.faces.application.ViewHandlerWrapper.renderView(ViewHandlerWrapper.java:286)
      at com.sun.faces.lifecycle.RenderResponsePhase.execute(RenderResponsePhase.java:120)
      at com.sun.faces.lifecycle.Phase.doPhase(Phase.java:101)
      at com.sun.faces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:139)
      at javax.faces.webapp.FacesServlet.service(FacesServlet.java:604)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:291)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:52)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.netbeans.modules.web.monitor.server.MonitorFilter.doFilter(MonitorFilter.java:393)
      at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:239)
      at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
      at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:219)
      at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:106)
      at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:503)
      at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:136)
      at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:79)
      at org.apache.catalina.valves.AbstractAccessLogValve.invoke(AbstractAccessLogValve.java:610)
      at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:88)
      at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:526)
      at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1078)
      at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:655)
      at org.apache.coyote.http11.Http11NioProtocol$Http11ConnectionHandler.process(Http11NioProtocol.java:222)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1566)
      at org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1523)
      at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
      at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61)
      at java.lang.Thread.run(Thread.java:745)

        Activity

        Hide
        Arran Mccullough added a comment -

        Attached test case to reproduce issue.

        Steps:

        Load welcomeICEfaces.jsf
        Initially a Login page is shown, click the Login to login.
        The Default page is now shown with an h:selectOneListbox on the page.
        From the Menu, select Two, the page Two content is shown.
        Select Three, the page Three content is shown.
        Select Two again, the error and dialog is now shown.

        Show
        Arran Mccullough added a comment - Attached test case to reproduce issue. Steps: Load welcomeICEfaces.jsf Initially a Login page is shown, click the Login to login. The Default page is now shown with an h:selectOneListbox on the page. From the Menu, select Two, the page Two content is shown. Select Three, the page Three content is shown. Select Two again, the error and dialog is now shown.
        Hide
        Mircea Toma added a comment -

        This issue is resolved by the fixes for ICE-11100 (more specifically the addition of InitializeHeadAndBodyFacetContainers class).

        Show
        Mircea Toma added a comment - This issue is resolved by the fixes for ICE-11100 (more specifically the addition of InitializeHeadAndBodyFacetContainers class).
        Hide
        Liana Munroe added a comment -

        Verified ICEfaces EE 3 trunk build 661 using attached test case. Tomcat 8, IE edge, 11, 10, 9, 8, 7, FF 43, Chrome 51.

        Show
        Liana Munroe added a comment - Verified ICEfaces EE 3 trunk build 661 using attached test case. Tomcat 8, IE edge, 11, 10, 9, 8, 7, FF 43, Chrome 51.

          People

          • Assignee:
            Mircea Toma
            Reporter:
            Arran Mccullough
          • Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: