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 11, 2011

Applies to:

PL/SQL - Version: 11.1.0.6 and later   [Release: 11.1 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

This document is being delivered to you via Oracle Support's Rapid Visibility (RaV) process and therefore has not been subject to an independent technical review.

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