My Oracle Support Banner

Calling a Static Procedure from a Member Procedure Results in PLS-00225 During Compilation of the Object Type Body (Doc ID 1294890.1)

Last updated on FEBRUARY 24, 2019

Applies to:

PL/SQL - Version 11.1.0.6 and later
Information in this document applies to any platform.

Symptoms


Calling a static procedure from a member procedure fails during compilation of the object type body with:

PLS-00225: subprogram or cursor 'OBJTYPENAME' reference is out of scope

The following test case scenario demonstrates the issue:

create type objType as object
(
num number,
static procedure staticProc,
constructor function objType(
self in out noCopy objType)
return self as result,
member procedure memberProc
)
/

create type body objType as

static procedure staticProc is
begin
null;
end;

constructor function objType(self in out noCopy objType) return self as result is
begin
self.num := 0;
return;
end;

member procedure memberProc is
begin
objType.staticProc();
end;
end;
/
show errors

PLS-00225: subprogram or cursor 'OBJTYPE' reference is out of scope

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Cause
Solution
References


My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.