5 Replies Latest reply: Dec 13, 2012 10:20 AM by 977656 RSS

    Error in Importing Application

    977656
      Hello,

      Apex 4.1.0.00.32
      Oracle 11gR2

      I am trying to import a application into my workspace but I am getting this error:

      rrorERR-1029 Unable to store session info. session=3423669073457443 item=40006855470898ORA-02091:
      transaction rolled back ORA-02291: integrity constraint (APEX_040100.WWV_FLOW_PAGE_DA_A_AR_FK) violated - parent key not found

      After doing some search found the below link

      ORA-02291: integrity constraint (APEX_040100.WWV_FLOW_PAGE_DA_A_AR_FK)

      and tried to implement the suggestions given by Paul and Giedrius Deveikis, but no luck with me, still getting the same error.

      After applying the build option to all my faulty DA, when I export my application and open it, I can still see those actions in my export file.

      Is this normal?

      I thought after applying the "Exclude build option", those DA's will not export with the application.

      Even when I try to copy the application, I am getting the same error.

      Not able to try the solution given by Kiran, because I don't have DBA access.

      Please help me on this.

      Regards
      Ani

      Edited by: 974653 on Dec 3, 2012 9:06 AM
        • 1. Re: Error in Importing Application
          Denes Kubicek
          Somewhere in your application you probably copied a page with an dynamic action referencing a region on another page. This is causing the import error. Try to locate that page and recreate the dynamic action.

          Denes Kubicek
          -------------------------------------------------------------------
          http://deneskubicek.blogspot.com/
          http://www.apress.com/9781430235125
          http://apex.oracle.com/pls/apex/f?p=31517:1
          http://www.amazon.de/Oracle-APEX-XE-Praxis/dp/3826655494
          -------------------------------------------------------------------
          • 2. Re: Error in Importing Application
            977656
            Hi Denes,

            Thanks for your support.

            I am just curious, when we copy a page, does the dynamic action point to my old page region(page which I copied) or the new page region?

            because when I go to edit any dynamic action, it shows regions of current page and of page 0 only.

            is there a short way I can found whether a region is of same page or another, because I am having more than 100 dynamic actions affecting a Region?

            with this query given below, I can found all the actions affecting a Region
            SELECT *
              FROM apex_application_page_da_acts
             WHERE (application_id,page_id, affected_region_id) 
                IN (SELECT application_id,page_id, affected_region_id
                      FROM apex_application_page_da_acts
                     WHERE affected_region_id IS NOT NULL)
             and application_id = 569 and AFFECTED_ELEMENTS_TYPE = 'Region'
            but how to know whether its pointing to the same page region or another page?

            or I have to go through each action? but in that case also how will I know that the Region selected is of same page or another?

            Regards,
            Ani

            Edited by: 974653 on Dec 3, 2012 9:49 AM
            • 3. Re: Error in Importing Application
              977656
              Hello,

              I tried below code to found any dynamic action referring any other page's region:
              declare
               v_flag number := 0;
              begin
              
                for rec1 in(SELECT page_id, action_name, affected_region_id, dynamic_action_name, action_sequence, affected_region
                FROM apex_application_page_da_acts
               WHERE (application_id,page_id, affected_region_id) 
                  IN (SELECT application_id,page_id, affected_region_id
                        FROM apex_application_page_da_acts
                       WHERE affected_region_id IS NOT NULL)
               and application_id = 569 and AFFECTED_ELEMENTS_TYPE = 'Region' order by page_id) loop
              
              
                  for rec in(SELECT application_id,page_id,region_id
                        FROM apex_application_page_regions where application_id = 569  and page_id = rec1.page_id) loop
              
                    if rec.region_id = rec1.affected_region_id then
                     v_flag := 1;
                     exit;
                    end if;
              
                  end loop;
              
                  if v_flag = 0 then 
                    dbms_output.put_line('page: '||rec1.page_id);
                    dbms_output.put_line('da: '||rec1.dynamic_action_name);
                    dbms_output.put_line('seq: '||rec1.action_sequence);
                    dbms_output.put_line('action: '||rec1.action_name);
                    dbms_output.put_line('region: '||rec1.affected_region);
                    dbms_output.put_line(' ');
                  end if;
              
              v_flag := 0;
              end loop;
              end;
              its not showing any region.

              Please check the code if I am missing anywhere and please let me know if there's any other way.

              Regards,
              Ani
              • 4. Re: Error in Importing Application
                977656
                Hello Experts,

                Can anyone please check this, still struggling with the above problem, no solution of this?

                According to the solution given by Denes, created the above script, that also not giving any result, is that script correct?

                or is there any other method to findout what Denes suggested?

                Ani

                Edited by: anicl on Dec 5, 2012 8:22 AM
                • 5. Re: Error in Importing Application
                  977656
                  Got help with this link:

                  ORA-02291: integrity constraint (APEX_040100.WWV_FLOW_PAGE_DA_A_AR_FK)

                  Query given by Giedrius Deveikis gives all the DA creating problem.

                  Ani

                  Edited by: anicl on Dec 13, 2012 8:20 AM