5 Replies Latest reply: Jan 23, 2013 2:07 AM by Dimitar Dimitrov RSS

    java.lang.IllegalStateException: Failed to locate a facet to be relocated.

    981831
      I am getting below exception for using same TaskFlow in 2 different tabs, but onclick of second tab below exception:

      java.lang.IllegalStateException: Failed to locate a facet to be relocated. The component must have been removed from the component tree when it should not have been. Expected to find the component under component with client ID "pt1:USma:0:MAt2:1:pt1:AP1:AT1" with relative search path "_ATp:ATt1".

      I have tried changing settings in web.xml for client saved to all, also changed bean scope from request to backing bean but no success.
        • 1. Re: java.lang.IllegalStateException: Failed to locate a facet to be relocated.
          Dimitar Dimitrov
          Please check if your <af:region> components are bound to one and same Taskflow binding in the PageDef. If it is so, then declare a new TF binding (based on the same TF definition) in the PageDef and bind the second <af:region> to it (e.g. bind separate <af:regions> to separate TF bindings).

          Dimitar
          • 2. Re: java.lang.IllegalStateException: Failed to locate a facet to be relocated.
            981831
            1) <af:region value="#{bindings.HzCpuiOrgViewListEXTNTF2.regionModel}" id="r1"/>

            <taskFlow id="HzCpuiOrgViewListEXTNTF2"
            taskFlowId="/WEB-INF/oracle/apps/cdm/foundation/parties/publicUi/organizations/flow/HzCpuiOrgViewListEXTNTF.xml#HzCpuiOrgViewListEXTNTF"
            activation="deferred"
            xmlns="http://xmlns.oracle.com/adf/controller/binding">

            2) <af:region value="#{bindings.HzCpuiOrgViewListEXTNTF1.regionModel}" id="r1"/>

            <taskFlow id="HzCpuiOrgViewListEXTNTF1"
            taskFlowId="/WEB-INF/oracle/apps/cdm/foundation/parties/publicUi/organizations/flow/HzCpuiOrgViewListEXTNTF.xml#HzCpuiOrgViewListEXTNTF"
            activation="deferred"
            xmlns="http://xmlns.oracle.com/adf/controller/binding">

            I have changed taskflow ids in pagedef, above reference code. still not working same exception. any thoughts...
            • 3. Re: java.lang.IllegalStateException: Failed to locate a facet to be relocated.
              Dimitar Dimitrov
              Your <af:region> components have same IDs (id="r1"), which is not correct unless these components are in different naming containers. Please set different values for the "id" attribute of the <af:region> tags.

              Dimitar
              • 4. Re: java.lang.IllegalStateException: Failed to locate a facet to be relocated.
                981831
                changed ids as well but same error: it is trying to relocate old facet for tab1, onclick of tab2 it is giving error with table id is not mapped, which is there in tab1 jsff page.

                not sure where i can see the mapping of adf controller, other than pagedef mapping which i made different but somewhere in the controller configuration it is not adding new mapping for tab2.

                Also I have tried different flows for tab1 and tab2 instead of same flow but same error, So tab2 is not allowing me change table contents to flow.

                Edited by: 978828 on Jan 22, 2013 11:15 PM
                • 5. Re: java.lang.IllegalStateException: Failed to locate a facet to be relocated.
                  Dimitar Dimitrov
                  As far as the error is not a common one (at least I have not encountered such one) there must be something wrong in the page or in its pagedef (assuming that the taskflow itself is OK as far as it is opened correctly on the 1st tab). From what I know so far (e.g. you were using a single TF binding instead of separate ones and both <af:region> tags were having one and same ID), I suspect that you have created the 2nd tab by copy-paste from the 1st one (which is not the correct way because you may have not configured the attributes of the duplicated components correctly).

                  Try to create a new similar page (containing a tab pane with 2 tabs and the given taskflow on each of them) and check if it works correctly. Create the whole page by drag-and-drop (avoiding any manual copy-paste) in order to avoid eventual errors caused by improper duplication of components and related misconfiguration. If the new page works correctly, compare it and its pagedef with your original page in order to find the difference causing the problem.

                  Dimitar