10 Replies Latest reply on Oct 28, 2015 10:38 AM by Christian Erlinger

    Forms 12.2.1: Error 801 unexpected fragile external reference

    Stauder

      Hi!

       

      Trying around a bit the new forms builder 12.2.1 on Windows against a 12.1.0.1.0 Database, I stumbled over the following issue when creating and compiling a package body:

       

      package declaration:

      package globals is 

      cursor get_emp is
      select last_name
      from hr.employees
      where employee_id = 205;

      emp get_emp%rowtype;

      end;

      and the package body:

      package body globals is
      begin

      open  get_emp;
      fetch get_emp into emp;
      close get_emp;

      end;

      When compiling the body, the internal error 801 is raised: [unexpected fragile external reference]

       

      Trying the same with a cursor like

       

        select user from dual

       

      is compiled successfully.

       

      Any ideas?

       

      Thanks in advance and regards

        • 1. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
          Roelof van Suilichem

          The quick-but-not-ideal suggestion would be to declare %rowtype from the EMP declaration, i.e. declare as some VARCHAR2(nn).

          But likely you know and don't like that option already

           

          I would suggest trying to reproduce in PL/SQL only, i.e. no Forms. Bug it with Support to either Forms or PLS, depending on the outcome. Either way the issue probably lies in the RSF.

          • 2. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
            CraigB

            package declaration:

            package globals is 

            cursor get_emp is
            select last_name
            from hr.employees
            where employee_id = 205;

            emp get_emp%rowtype;

            end;

            and the package body:

            package body globals is
            begin

            open  get_emp;
            fetch get_emp into emp;
            close get_emp;

            end;

            Is this the FULL code of your "GLOBALS" Forms Program Unit package?  A package is a collection of Procedures and Functions.  Your Package Body doesn't have any of these!  Forms 11g allowed you to build this type of "Invalid" object when it should have reported a compile error.  If you try to create this type of package in the database you will get the following error:

            PLS-00103: Encountered the symbol "FETCH" when expecting one of the following: BEGIN END FUNCTION PRAGMA PROCEDURE SUBTYPE TYPE....

             

            My guess is that this is that Forms 12c is finally enforcing this...

             

            Craig...

            • 3. Re: Re: Forms 12.2.1: Error 801 unexpected fragile external reference
              Christian Erlinger

              works for me in plain PL/SQL, I don't know why this shouldn't work in forms:

               

              $[CRONET@oracle12cr1_prod] select * from v$version;
              
              BANNER                                                                          |    CON_ID
              --------------------------------------------------------------------------------|----------
              Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production    |         0
              PL/SQL Release 12.1.0.2.0 - Production                                          |         0
              CORE    12.1.0.2.0      Production                                                      |         0
              TNS for Linux: Version 12.1.0.2.0 - Production                                  |         0
              NLSRTL Version 12.1.0.2.0 - Production                                          |         0
              
              $[CRONET@oracle12cr1_prod] create table mytab as select level id, 'xxx' data from dual connect by level < 10;
              
              Table created.
              
              $[CRONET@oracle12cr1_prod] create or replace package mypkg as
                2  cursor c is
                3  select id, data
                4  from mytab;
                5  --
                6  rec c%rowtype;
                7  procedure print_c;
                8  end;
                9  /
              
              Package created.
              
              $[CRONET@oracle12cr1_prod] ed
              Wrote file c:\temp\afiedt.sql
              
                1  create or replace package body mypkg as
                2  procedure print_c is
                3  begin
                4    dbms_output.put_line('id: '||rec.id);
                5    dbms_output.put_line('data: '||rec.data);
                6  end;
                7  begin
                8  open c;
                9  fetch c into rec;
              10  close c;
              11* end;
              $[CRONET@oracle12cr1_prod] r
                1  create or replace package body mypkg as
                2  procedure print_c is
                3  begin
                4    dbms_output.put_line('id: '||rec.id);
                5    dbms_output.put_line('data: '||rec.data);
                6  end;
                7  begin
                8  open c;
                9  fetch c into rec;
              10  close c;
              11* end;
              
              Package body created.
              
              $[CRONET@oracle12cr1_prod] exec mypkg.print_c;
              id: 1
              data: xxx
              
              PL/SQL procedure successfully completed.
              
              $[CRONET@oracle12cr1_prod]
              
              

               

              so I guess this counts as...well..."unexpected behaviour"

               

              cheers

               

              edit: oh and by the way it works as well when I don't have the procedure in the package, I just added it so I can call something in the package (but referencing rec from another stored procedure should work as well).

               

              cheers

              • 4. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                Michael Ferrante-Oracle

                Before diving in too deep technically, I have to ask... did you read the recommended docs before getting this far?  That should include the Certification Guide, System Requirements, and Release Notes.  I would recommend you refer to the Release Notes entry 2.3.15.  This refers to a patch that includes fixes for pl/sql and other areas of the layer we often refer to as the "RSF".

                 

                http://docs.oracle.com/middleware/1221/formsandreports/FRREL/forms.htm#FRREL5304

                 

                I don't know if this will fix your issue, but it will prevent you from later exposing the issue noted in that entry.  While you're in the Release Notes, I encourage you to review the rest of that doc so that you can become aware of issues that we already know might exist.

                • 5. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                  Christian Erlinger

                  Michael Ferrante-Oracle wrote:

                   

                  I would recommend you refer to the Release Notes entry 2.3.15.

                  Just out of curiosity, but Patch 21892409 is a 11.2.0.3 database bundle patch. The Unix patch 21534616 is a stand alone patch, but is for 11.2.0.3 as well. Just to be clear: I am not wondering about the patch being a database patch, but the version it's for: 11.2.0.3. To me this means that Forms 12c runs with a 11.2.0.3 plsql.dll?

                   

                  cheers

                  • 6. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                    Stauder

                    Thanks for reply Roelof!

                     

                    But that also don't work. I've tried:

                    pkg_last_name varchar2(25);

                     

                    as well as

                    pkg_last_name hr.employee.last_name%type;


                    as the cursors target, but both raise the same internal error 801.


                    btw:

                     

                    package globals is

                    cursor get_emp is
                    select 'TEST' last_name
                    from hr.employees
                    where employee_id = 205;

                    emp get_emp%rowtype;

                    end;


                    works ...


                    Regards


                    • 7. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                      Stauder

                      Hi Craig and thanks for your reply! For sure I broke it down to the minimum to make it as readable as possible. I can create and compile the same package in the 12c database without any issues, as Christian alreay mentioned. So it has nothing to do with the database version. Regards

                      • 8. Re: Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                        Stauder

                        Hello Mr. Ferrante!

                         

                        Thank yor for reply!

                         

                        And yes, I've spend the sunday with reading the docs that I could find.

                         

                        I've read "Oracle® Fusion Middleware Release Notes for Oracle Forms and Reports" two times (minimum)

                        and "Oracle® Fusion Middleware Installing Oracle Forms and Reports".

                         

                        I also would like to read "Oracle Forms 12c (12.2.1) Technical Papers", but the link links to it self.

                         

                        I've read the Excel sheet "System Requirements and Supported Platforms for Oracle Fusion Middleware 12c (12.2.1)"

                        and all the requirements met my "infrastructure".


                        Forms 12c don't throw an ORA-306500. It looks like this:

                        Zwischenablage04.jpg

                        That's it.

                         

                        I'm sorry if I ask something you already know.

                         

                        Regards

                        • 9. Re: Re: Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                          Stauder

                          Hi Christian!

                           

                          Thanks for your effort and the nice elaboration!

                           

                          And you're right!

                           

                          All the DLLs in 12c %middleware_home% are version 11 from 2011 ... 

                           

                          Zwischenablage05.jpg

                           

                          Cheers

                          • 10. Re: Forms 12.2.1: Error 801 unexpected fragile external reference
                            Christian Erlinger

                            Hm. As the binaries seems to be from 11.1.0.6 an option would be to try it on a 11.1.0.6 database and see if that works. For me it works under 11.2.0.4 (I have no 11gR1 database available).

                             

                            If you applied the patches and dug through the documents Michael gave you without finding anything that helps you you might want to raise a SR with Oracle Support if you can't workaround your issue...

                             

                            cheers