Skip to Main Content

SQL Developer for VS Code

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Interested in getting your voice heard by members of the Developer Marketing team at Oracle? Check out this post for AppDev or this post for AI focus group information.

PLS-00201 and PLS-00304 when compiling object TYPE.

DataProcessingNov 17 2024

Can anyone reproduce this ISSUE?
Using version 24.3.1 (or earlier version).

APPEARS TO BE A BUG WITH TYPE objects having both SPEC and BODY.
Consistently reproducible following these steps.

Compile both TYPE Spec, and TYPE BODY using the script at bottom..
Refresh the TYPES node in object tree to see the new type UTBUG.
Open type UTBUG Spec in worksheet, review the code, then CLOSE worksheet.
Open type UTBUG Body in worksheet and RECOMPILE the BODY.
REVIEW the SCRIPT OUTPUT tab showing BODY compiled successfully, followed by ERROR(s) PLS-00201, PLS-00304.

***RECOMPILE SCRIPT OUTPUT ***

Type Body BUGTYPE compiled

***IMMEDIATELY FOLLOWED BY***

LINE/COL ERROR
--------- -------------------------------------------------------------
0/0 PL/SQL: Compilation unit analysis terminated
1/11 PLS-00201: identifier 'BUGTYPE' must be declared
1/11 PLS-00304: cannot compile body of 'BUGTYPE' without its specification

Errors: check compiler log

*** SCRIPT ***

CREATE OR REPLACE EDITIONABLE TYPE BUGTYPE

authid current_user

as object

(

label varchar2(4000 char)

, constructor function bugtype(self in out nocopy bugtype

                        , v\_label\_in  in varchar2) return self as result

)

/

CREATE OR REPLACE EDITIONABLE TYPE BODY BUGTYPE

AS

constructor function bugtype(self in out nocopy bugtype

                        , v\_label\_in  in varchar2) return self as result

is

begin

  label := v\_label\_in;

  return;

end;

end;

/

*** Initial compilation for both Spec and Body are successful. ***

Type BUGTYPE compiled

Type Body BUGTYPE compiled

Comments
Post Details
Added on Nov 17 2024
3 comments
120 views