Re: ORA-06508: PL/SQL: could not find program unit being called

From: Tony Rothwell <news_at_santen.demon.co.uk>
Date: Mon, 27 Apr 1998 21:44:23 +0100
Message-ID: <jQ+dBBAn4OR1EwAl_at_santen.demon.co.uk>


In article <akQ01.12461$m7.6818288_at_news21.bellglobal.com>, Philippe Grenier <Philippe.Grenier_at_cgi.ca> wrote
>This error will also occur, in Forms 5.0, from time to time. I haven't found
>yet the cause for this, but I know that when I look in my attached library,
>the procedure exists. So, for now, the suggested solution is to scrap the
>attachment to the concerned library and reattach it and DO remove the
>path.
>

There's a bug (I know that's hard to believe!) in the Forms 5 PL/SQL engine. This is a bit complicated...

Sometimes, when you add a new object to a package which is in a library, if the new object is placed before (or between) existing objects in the package specification (i.e. NOT at the end of the spec), references to the original package objects can get screwed up. Forms seems to be using ordinal positions of objects in library packages; if you change the position of the object in the package spec, existing calls to the object get screwed up.

This can cause some very strange things: it can result in calls to procedures actually running the procedure body of a different procedure to the one you called (ahhhg!), or raise error ORA-6508, or do nothing when you call the procedure. Sometimes recomiling the form fixes this; othertimes the library has to be re-attached to the form.

With some of our core library packages, if we change the spec we now have to also re-attach the library to all our forms. This is obviously a complete crock.

We had a library package which managed all the Open_Form and New_Form calls in our application. A new function was added to the beginning of the package spec; this resulted in all calls to our "Open_Form" procedure actually running our "New_Form" procedure body, which caused quite a few problems and was a nightmare to track down as you can imagine.

-- 
Tony Rothwell
Received on Mon Apr 27 1998 - 22:44:23 CEST

Original text of this message