Home » SQL & PL/SQL » SQL & PL/SQL » PL/SQL: could not find program unit being called when calling packages
PL/SQL: could not find program unit being called when calling packages [message #671789] Wed, 19 September 2018 09:36 Go to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Hi ALL,

Recently i am facing issue "Program Unit being called" when calling another package/procedure with in our package.

Whenever we change anything in the child or parent package and execute the parent package it shows the error "Could not find program unit called" when calling the child package.

Thanks,
Venkatesh
Re: PL/SQL: could not find program unit being called when calling packages [message #671791 is a reply to message #671789] Wed, 19 September 2018 10:28 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read

we can't say what is wrong since you did not actually SHOW us (using COPY & PASTE) what was done
Re: PL/SQL: could not find program unit being called when calling packages [message #671820 is a reply to message #671789] Thu, 20 September 2018 06:39 Go to previous messageGo to next message
EdStevens
Messages: 1249
Registered: September 2013
Senior Member
Can you debug code that you cannot see?

Neither can anyone else.
Re: PL/SQL: could not find program unit being called when calling packages [message #671841 is a reply to message #671820] Thu, 20 September 2018 09:27 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Yeah, I have debug code. While debugging i have found Child package is not calling and getting error message "program unit not being called". It was working sometimes back.

Thanks,
Venkatesh
Re: PL/SQL: could not find program unit being called when calling packages [message #671842 is a reply to message #671841] Thu, 20 September 2018 09:29 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
venki8286 wrote on Thu, 20 September 2018 15:27
It was working sometimes back.
And what's changed?

Edit: Have you recompiled the package?

[Updated on: Thu, 20 September 2018 09:30]

Report message to a moderator

Re: PL/SQL: could not find program unit being called when calling packages [message #671843 is a reply to message #671841] Thu, 20 September 2018 09:30 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
venki8286 wrote on Thu, 20 September 2018 07:27
Yeah, I have debug code. While debugging i have found Child package is not calling and getting error message "program unit not being called". It was working sometimes back.

Thanks,
Venkatesh
Then you or somebody else broke working code.
Revert back to working version.
Words above contain NO actionable details.

You claim a problem exists, but refuse to SHOW us using COPY & PASTE exactly what you do & how Oracle responds.

Please read and follow the forum guidelines, to enable us to help you:
OraFAQ Forum Guide
How to use {code} tags and make your code easier to read


Re: PL/SQL: could not find program unit being called when calling packages [message #671844 is a reply to message #671842] Thu, 20 September 2018 09:31 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Trying to add some additional validations in the child package and complied.
Re: PL/SQL: could not find program unit being called when calling packages [message #671845 is a reply to message #671844] Thu, 20 September 2018 09:32 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
venki8286 wrote on Thu, 20 September 2018 07:31
Trying to add some additional validations in the child package and complied.
More empty & useless words

SHOW us what you do & how Oracle responds!
Re: PL/SQL: could not find program unit being called when calling packages [message #671846 is a reply to message #671844] Thu, 20 September 2018 09:32 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
another point : again after reverting changes, then also it is not working; showing same error message
Re: PL/SQL: could not find program unit being called when calling packages [message #671847 is a reply to message #671846] Thu, 20 September 2018 09:33 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
venki8286 wrote on Thu, 20 September 2018 07:32
another point : again after reverting changes, then also it is not working; showing same error message
More empty & useless words

SHOW us what you do & how Oracle responds!
Re: PL/SQL: could not find program unit being called when calling packages [message #671848 is a reply to message #671847] Thu, 20 September 2018 09:42 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Please refer attached files that we are calling.
First we call this package XXBSI_ORDER and then internally child package "XXBSI_ISG_ORDER_IMPORT_API" will call in main the package.
Re: PL/SQL: could not find program unit being called when calling packages [message #671849 is a reply to message #671848] Thu, 20 September 2018 09:43 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Second attachment.

Let us know if you have any questions

[Updated on: Thu, 20 September 2018 09:44]

Report message to a moderator

Re: PL/SQL: could not find program unit being called when calling packages [message #671852 is a reply to message #671849] Thu, 20 September 2018 09:47 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
Show us the output from this please:

SQL> select object_name, object_type, status
     from dba_objects
     where object_type in ('PACKAGE', 'PACKAGE BODY') and object_name='XXBSI_ORDER' and owner='APPS';
Re: PL/SQL: could not find program unit being called when calling packages [message #671854 is a reply to message #671852] Thu, 20 September 2018 09:58 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Please find attached screenshot
Re: PL/SQL: could not find program unit being called when calling packages [message #671855 is a reply to message #671854] Thu, 20 September 2018 10:04 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
Usually the error message "Could not find program unit called" is accompanied by an error stack of ORA-XXXXX errors. Can you let us know what they are?
Re: PL/SQL: could not find program unit being called when calling packages [message #671856 is a reply to message #671855] Thu, 20 September 2018 10:07 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Error Message : ORA-06508: PL/SQL: could not find program unit
Re: PL/SQL: could not find program unit being called when calling packages [message #671857 is a reply to message #671856] Thu, 20 September 2018 10:08 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
No others?
Re: PL/SQL: could not find program unit being called when calling packages [message #671858 is a reply to message #671857] Thu, 20 September 2018 10:09 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
no
Re: PL/SQL: could not find program unit being called when calling packages [message #671859 is a reply to message #671856] Thu, 20 September 2018 10:13 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
venki8286 wrote on Thu, 20 September 2018 08:07
Error Message : ORA-06508: PL/SQL: could not find program unit
I don't believe you!

[oracle@localhost ~]$ oerr ora 6508
06508, 00000, "PL/SQL: could not find program unit being called %s"
// *Cause:
// by *Action:

NOTICE the "%s" on the right end.

Why do you refuse to provide us requested COPY & PASTE details?

I am concerned that error are quietly "consumed" & ignored by flawed WHEN OTHETS

http://www.orafaq.com/wiki/WHEN_OTHERS
Re: PL/SQL: could not find program unit being called when calling packages [message #671860 is a reply to message #671859] Thu, 20 September 2018 10:17 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
What else you required from me. I have already attached my files to you.. Why are using asking me to paste code here? Code will contains 100+ lines. so that why i attached my files. Please refer those attachments.
Re: PL/SQL: could not find program unit being called when calling packages [message #671861 is a reply to message #671860] Thu, 20 September 2018 10:38 Go to previous messageGo to next message
Michel Cadot
Messages: 67369
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

First remove/comment all WHEN OTHERS and retry.

Re: PL/SQL: could not find program unit being called when calling packages [message #671862 is a reply to message #671861] Thu, 20 September 2018 10:55 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
If i removed exception it is working, but we need exception. Can you please help how we have to keep exception.
Re: PL/SQL: could not find program unit being called when calling packages [message #671863 is a reply to message #671862] Thu, 20 September 2018 11:00 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
You have to handle the exception correctly rather than use a WHEN OTHERS clause. As others have said, read up about WHEN OTHERS on this site.
Re: PL/SQL: could not find program unit being called when calling packages [message #671864 is a reply to message #671862] Thu, 20 September 2018 11:38 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
venki8286 wrote on Thu, 20 September 2018 08:55
If i removed exception it is working, but we need exception. Can you please help how we have to keep exception.
You have NEVER actually posted the name of the "missing" program unit.

Why do you REFUSE to post COPY & PASTE excerpt that shows us the actual code line being executed that throws ORA-06058 error?
Re: PL/SQL: could not find program unit being called when calling packages [message #671865 is a reply to message #671862] Thu, 20 September 2018 13:12 Go to previous messageGo to next message
joy_division
Messages: 4949
Registered: February 2005
Location: East Coast USA
Senior Member
venki8286 wrote on Thu, 20 September 2018 11:55
If i removed exception it is working, but we need exception. Can you please help how we have to keep exception.
This makes no sense. Removing exception handling makes it work? I don't believe you. An exception will be triggered only if there is an exception, so how does removing it make it work?
Re: PL/SQL: could not find program unit being called when calling packages [message #671866 is a reply to message #671865] Thu, 20 September 2018 13:25 Go to previous messageGo to next message
Michel Cadot
Messages: 67369
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

I suspect he removed the error handlers inside the package but not inside the caller and the "Could not find program unit called" comes from the removed error handlers.

Before, caller -> procedure -> exception -> procedure error handler -> "Could not find program unit called"
After, caller -> procedure -> exception -> caller error handler does nothing so "it works".

Re: PL/SQL: could not find program unit being called when calling packages [message #671872 is a reply to message #671866] Fri, 21 September 2018 04:52 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
Exactly, i comment exception code and it is working. if i again keep exception it is not working. It is so strange
Re: PL/SQL: could not find program unit being called when calling packages [message #671873 is a reply to message #671872] Fri, 21 September 2018 04:59 Go to previous messageGo to next message
gazzag
Messages: 1082
Registered: November 2010
Location: Bristol, UK
Senior Member
How do you know that it "worked"? Not throwing an error is not necessarily the same as working.
Re: PL/SQL: could not find program unit being called when calling packages [message #671875 is a reply to message #671873] Fri, 21 September 2018 05:15 Go to previous messageGo to next message
venki8286
Messages: 29
Registered: May 2015
Location: Hyderabad
Junior Member
I have kept debug messages in both parent & child packages and then commented the exception in parent package; ran main package and observed in debug messages that child package is reading. so that why i have told it is working and program is running without any issues.

If i again keep exception in the main package, it is not even calling the child package and throwing exception "ORA-06508: PL/SQL: could not find program unit being called". this is a strange behavior.

Thanks,
Venkatesh
Re: PL/SQL: could not find program unit being called when calling packages [message #671876 is a reply to message #671872] Fri, 21 September 2018 05:28 Go to previous messageGo to next message
Michel Cadot
Messages: 67369
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

There is nothing strange, I told you what happened, just fix your code.

Re: PL/SQL: could not find program unit being called when calling packages [message #671878 is a reply to message #671875] Fri, 21 September 2018 07:30 Go to previous messageGo to next message
BlackSwan
Messages: 26733
Registered: January 2009
Location: SoCal
Senior Member
venki8286 wrote on Fri, 21 September 2018 03:15
I have kept debug messages in both parent & child packages and then commented the exception in parent package; ran main package and observed in debug messages that child package is reading. so that why i have told it is working and program is running without any issues.

If i again keep exception in the main package, it is not even calling the child package and throwing exception "ORA-06508: PL/SQL: could not find program unit being called". this is a strange behavior.

Thanks,
Venkatesh
You have a mystery & give us no clues.
We can't debug code we can NOT see.

Why do you REFUSE to post COPY & PASTE excerpt that shows us the actual code line being executed that throws ORA-06058 error?
Re: PL/SQL: could not find program unit being called when calling packages [message #671879 is a reply to message #671841] Fri, 21 September 2018 15:20 Go to previous messageGo to next message
EdStevens
Messages: 1249
Registered: September 2013
Senior Member
venki8286 wrote on Thu, 20 September 2018 09:27
Yeah, I have debug code. While debugging i have found Child package is not calling and getting error message "program unit not being called". It was working sometimes back.

Thanks,
Venkatesh
But now you are asking *us* to debug it *without* seeing it . . . .
Re: PL/SQL: could not find program unit being called when calling packages [message #672073 is a reply to message #671879] Mon, 01 October 2018 08:57 Go to previous message
Bill B
Messages: 1969
Registered: December 2004
Senior Member
Run the following command and show us what the result is. You MUST run this command as the same user that you are running the test in and getting the error

select owner,object_name, object_type, status
     from ALL_objects
     where object_name='XXBSI_ISG_ORDER_IMPORT_API';

[Updated on: Mon, 01 October 2018 08:57]

Report message to a moderator

Previous Topic: Listing all dates in a date range
Next Topic: Creating a function
Goto Forum:
  


Current Time: Thu Sep 24 04:15:06 CDT 2020