Home » Developer & Programmer » Forms » Automatic recompile of procedure body failed (Oracle forms, 10G, Windows 7)
icon4.gif  Automatic recompile of procedure body failed [message #613310] Sun, 04 May 2014 07:31 Go to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi all,

I am getting the error 'automatic recompile of procedure body failed' (Internal error also) while compiling the form. I came across many threads but none of the links resolved my issue. I am using Oracle developer suite 10g, DB 10g and Windows OS. I am referring one package from 'AAA' schema(VALID state), form is connected to same schema but i am getting error while compiling. I reconnected from form builder, recompiled the package as suggested by many links, still facing the same problem. Please help.

Thanks,
Pramod
Re: Automatic recompile of procedure body failed [message #613321 is a reply to message #613310] Sun, 04 May 2014 09:32 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Could you post that procedure's code? If so, please, make sure it is properly formatted and then enclose it into [code] tags so that people wouldn't have problems reading it. (Here's how, if you are unsure of how to do that).
Re: Automatic recompile of procedure body failed [message #613324 is a reply to message #613321] Mon, 05 May 2014 01:19 Go to previous messageGo to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi Littlefoot,

Thanks for your time. I dont think it is related to a particular procedure in a package because i am calling around 5-6 procedures from the same package, i noticed that all the procedures are giving the same error as i mentioned above. I am posting one procedure from the package. Please check.
CREATE OR REPLACE
PACKAGE process_barcode_variant AUTHID CURRENT_USER
IS
  -- Global variable - Limit for bulk fetch
  g_bulk_limit NUMBER       := 500;
  g_user_id    VARCHAR2(20) := NVL(dw_jobs.g_userid, USER);
  PROCEDURE remove_barcode(
      p_brand       IN VARCHAR2,
      p_part_number IN VARCHAR2,
      p_barcode     IN VARCHAR2);
END process_barcode_variant;
--Spec Ends
/
CREATE OR REPLACE
PACKAGE BODY process_barcode_variant
AS
PROCEDURE remove_barcode(
    p_brand       IN VARCHAR2,
    p_part_number IN VARCHAR2,
    p_barcode     IN VARCHAR2)
AS
BEGIN
  DELETE
  FROM barcode_variant
  WHERE brand     = p_brand
  AND part_number = p_part_number
  AND barcode     = p_barcode;
  DELETE
  FROM barcode
  WHERE brand     = p_brand
  AND part_number = p_part_number
  AND barcode     = p_barcode;
  COMMIT;
EXCEPTION
WHEN OTHERS THEN
  raise_application_error (-20050, 'REMOVE_BARCODE =>' || sqlerrm || dbms_utility.format_error_backtrace);
END remove_barcode;
END process_barcode_variant;
--Body Ends
/

[Updated on: Mon, 05 May 2014 01:20]

Report message to a moderator

Re: Automatic recompile of procedure body failed [message #613326 is a reply to message #613324] Mon, 05 May 2014 01:33 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I was hoping for the form procedure, the one which called this package. Could you post that?
Re: Automatic recompile of procedure body failed [message #613328 is a reply to message #613326] Mon, 05 May 2014 01:47 Go to previous messageGo to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi Littlefoot, Here i am posting complete code from a button.
DECLARE
  i     NUMBER DEFAULT 0;
  l_cnt NUMBER := 0;
  al_con ALERT;
BEGIN
  IF :SYSTEM.mode     <> 'ENTER-QUERY' THEN
    IF :CONTROL.brand IS NULL THEN
      disp_msg('Brand has to be entered');
      go_item('CONTROL.brand');
    ELSE
      IF :BARCODE_VARIANT_V.article IS NOT NULL THEN
        i                           := barcode.g_select.first;
        IF i                        IS NULL THEN
          disp_msg('You have not selected any Barcode');
        ELSE
          go_block('BARCODE_VARIANT_V');
          LOOP
            go_record(i);
            SELECT COUNT(1)
            INTO l_cnt
            FROM barcode_variant_v
            WHERE brand     = :CONTROL.brand
            AND part_number = :BARCODE_VARIANT_V.part_number;
            IF l_cnt        > 1 THEN
              al_con       := find_alert('CONFIRMATION');
              set_alert_property(al_con,alert_message_text,'Do you really want to delete the barcode ?');
              IF show_alert(al_con) = alert_button1 THEN
                process_barcode_variant.remove_barcode(p_brand => :BARCODE_VARIANT_V.brand, p_part_number => :BARCODE_VARIANT_V.part_number, p_barcode => :BARCODE_VARIANT_V.barcode);
              END IF;
            END IF;
            i := barcode.g_select.next(i);
            EXIT
          WHEN i IS NULL;
          END LOOP;
        END IF;
      END IF;
    END IF;
  END IF;
END IF;
EXCEPTION
WHEN OTHERS THEN
  MESSAGE(SQLERRM);
END;

[Updated on: Mon, 05 May 2014 01:51]

Report message to a moderator

Re: Automatic recompile of procedure body failed [message #613329 is a reply to message #613328] Mon, 05 May 2014 02:03 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Try to rewrite the REMOVE_BARCODE call in the following manner (i.e. use positional instead of named notation):
process_barcode_variant.remove_barcode(:BARCODE_VARIANT_V.brand, :BARCODE_VARIANT_V.part_number, :BARCODE_VARIANT_V.barcode);

Then try to recompile the form (Ctrl + Shift + K). Any improvement?
Re: Automatic recompile of procedure body failed [message #613333 is a reply to message #613329] Mon, 05 May 2014 03:00 Go to previous messageGo to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi Littlefoot,

No but i would like to provide more info about the issue. Below is the error file generated when i compile the FMB using frmcmp userid=us/pw@tns module=<form_name>.fmb batch=yes module_type=form compile_all=yes window_state=minimize.
Compiling package specification BARCODE... 
   No compilation errors.

Compiling procedure DISP_MSG... 
   No compilation errors.

Compiling package body BARCODE...
   No compilation errors.

Compiling procedure UPLOAD_CLIENT_FILE... 
   No compilation errors.

Compiling procedure CHECK_PRIVILEGES... 
   No compilation errors.

Compiling procedure AAA_REVISION_HISTORY... 
   No compilation errors.

Compiling procedure CENTER_POS_WINDOW... 
   No compilation errors.

Compiling WHEN-NEW-FORM-INSTANCE trigger on form...
   No compilation errors.

Compiling KEY-ENTQRY trigger on form...
   No compilation errors.

Compiling KEY-EXEQRY trigger on form...
   No compilation errors.

Compiling KEY-DELREC trigger on form...
   No compilation errors.

Compiling KEY-UPDREC trigger on form...
   No compilation errors.

Compiling KEY-CREREC trigger on form...
   No compilation errors.

Compiling ON-ERROR trigger on form...
   No compilation errors.

Compiling CLRFRM trigger on form...
   No compilation errors.

Compiling WHEN-WINDOW-CLOSED trigger on form...
   No compilation errors.

Compiling KEY-CLRFRM trigger on form...
   No compilation errors.

Compiling KEY-COMMIT trigger on form...
   No compilation errors.

Compiling PRE-QUERY trigger on BARCODE_VARIANT_V data block...
   No compilation errors.

Compiling WHEN-NEW-RECORD-INSTANCE trigger on BARCODE_VARIANT_V data block...
   No compilation errors.

Compiling WHEN-CHECKBOX-CHANGED trigger on CHK_BARCODE item in BARCODE_VARIANT_V data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on MODIFIEDON item in BARCODE_VARIANT_V data block...
   No compilation errors.

Compiling KEY-DOWN trigger on CONTROL data block...
   No compilation errors.

Compiling KEY-UP trigger on CONTROL data block...
   No compilation errors.

Compiling KEY-CLRREC trigger on CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on BRAND_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on BRAND_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on BRAND_BUT item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on ADD item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on ADD item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on REMOVE item in CONTROL data block...
Compilation error on WHEN-BUTTON-PRESSED trigger on REMOVE item in CONTROL data block:
PL/SQL ERROR 801 at line 1, column 1
internal error [60603]
PL/SQL ERROR 0 at line 43, column 16
Statement ignored

Compiling KEY-NEXT-ITEM trigger on REMOVE item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on SEARCH_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on SEARCH_BUT item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on UPLOAD item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on DOWNLOAD item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on DOWNLOAD item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on BARCODE item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on OK item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on OK item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on CANCEL item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on CANCEL item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on DOWNLOAD_OK item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on DOWNLOAD_CANCEL item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on DOWNLOAD_CANCEL item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H1_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on H1_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H2_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on H2_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H3_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on H3_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H4_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on H4_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H5_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on H5_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H6_DESC item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on H6_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on H6_BUT item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on FIND_BUT item in CONTROL data block...
   No compilation errors.

Compiling KEY-NEXT-ITEM trigger on FIND_BUT item in CONTROL data block...
   No compilation errors.

Compiling WHEN-BUTTON-PRESSED trigger on DUMMY item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_CLIENTINFO_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_FILE_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_HOST_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_SESSION_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_FILETRANSFER_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_OLE_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_C_API_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compiling WHEN-CUSTOM-ITEM-EVENT trigger on WEBUTIL_BROWSER_FUNCTIONS item in WEBUTIL data block...
   No compilation errors.

Compilation errors have occurred.
Re: Automatic recompile of procedure body failed [message #613335 is a reply to message #613333] Mon, 05 May 2014 03:12 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As this exception handler section does nothing (basically, "WHEN OTHERS THEN MESSAGE" is rather useless), remove it completely from the WHEN-BUTTON-PRESSED trigger and recompile again. What happens?
Re: Automatic recompile of procedure body failed [message #613336 is a reply to message #613335] Mon, 05 May 2014 03:19 Go to previous messageGo to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi littlefoot,

Same issue Sad Confused
Re: Automatic recompile of procedure body failed [message #613337 is a reply to message #613336] Mon, 05 May 2014 03:23 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I'm afraid I don't have any other ideas ... maybe someone else will be able to assist. Otherwise, consider contacting Oracle Support.
Re: Automatic recompile of procedure body failed [message #613339 is a reply to message #613337] Mon, 05 May 2014 03:52 Go to previous messageGo to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi Littlefoot,

I tried like this-
I copied the procedure REMOVE_BARCODE to some other package and called the procedure from the new package then it compiled i didn't get any errors.
Is it related to any Synonyms or Grants issue? but i have created the package in 'A' schema and in form builder i have connected to the same schema.
Re: Automatic recompile of procedure body failed [message #613340 is a reply to message #613339] Mon, 05 May 2014 04:01 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Oracle doesn't complain about not seeing the procedure so I suppose that it is not about grants. "Internal error" could be anything, and I don't know how to find what exactly causes it - that's why I suggested you to contact Oracle.

If compilation succeeds when the procedure is moved into another package, try to drop the original package and create it again (with the same name). Don't forget to save its source code (so that you wouldn't lose it) as well as grantees. Note that doing that (dropping the package) shouldn't be done when people work with the database as any related objects will get invalidated and you might not be able to recompile them.
Re: Automatic recompile of procedure body failed [message #613341 is a reply to message #613340] Mon, 05 May 2014 04:30 Go to previous messageGo to next message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi Littlefoot,

Issue got resolved. In package spec i have used
g_user_id    VARCHAR2(20) := NVL(dw_jobs.g_userid, USER);

where dw_jobs package itself was not there. Thanks for your support Smile
I have a question, why oracle is not throwing error when i compile that package?

[Updated on: Mon, 05 May 2014 04:33]

Report message to a moderator

Re: Automatic recompile of procedure body failed [message #613343 is a reply to message #613310] Mon, 05 May 2014 04:36 Go to previous messageGo to next message
Littlefoot
Messages: 21807
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
Is that so? OK then, I'm glad you found the solution.

However, you said (in the first message):

pramod.sramesh wrote on Sun, 04 May 2014 14:31

... recompiled the package ...


How could you compile it - successfully! - if DW_JOBS didn't exist at the moment?
Re: Automatic recompile of procedure body failed [message #613353 is a reply to message #613343] Mon, 05 May 2014 06:48 Go to previous message
pramod.sramesh
Messages: 23
Registered: November 2011
Location: Bangalore
Junior Member
Hi Littlefoot,

Let me correct my comments above.
dw_jobs

package is in another schema and we have a privilege to execute it. I noticed that our DB is migrated from 10g to 11g. I just moved the declaration of the variable to package body and the problem got resolved. I did not understand the reason behind that.

Thanks,
Pramod
Previous Topic: the name of the Canvas associated with the item
Next Topic: Query condition in form
Goto Forum:
  


Current Time: Tue Apr 23 22:36:11 CDT 2024