Solved

Issue while debugging "could not find program unit being called"

  • 31 July 2021
  • 4 replies
  • 250 views

Userlevel 7
Badge +11

I faced this issue during a technical investigation. There was an error message prompting in the application.

 

"Invoice.ACCERROR1: Error (The Voucher Row object already exists.) occurred while booking Invoice CN xxxxxx"

 

After copying the PLSQL Details, pasted it in the Test Window and ran it. The error message came as same as shown in the app. While debugging there was a requirement of inserting traces using Dbms_output. The packages that I inserted were Voucher_Row_API, INVOICE_API and Voucher_Util_Pub_API.

 

The traces were inserted and compiled without any issues. They worked fine for a while. But in the middle of the investigation, the error message changed to

 

"Invoice.ACCERROR1: Error (could not find program unit being called) occurred while booking Invoice CN xxxxxx."

 

As you can see the text inside the bracket changed from ' The Voucher Row object already exists' to 'could not find program unit being called'.

 

This also changes the error stack.

 

Why is this happening and is there a way to fix this.

icon

Best answer by Jagath Kandambi 1 August 2021, 07:30

View original

This topic has been closed for comments

4 replies

Userlevel 5
Badge +6

This could be due to invalidation of the underline database objects due to some other developments in the database during the time you were debugging the code.
There could be parallel developments in the database on the same database objects you are using and they may invalidate the database objects from time to time. 

Have you checked the invalid objects in the database when you received this issue?
Recompiling the invalid objects before starting the debugging would help.

Userlevel 6
Badge +7

Hi,

I have faced similar kind of situation when investigations issues related to reports. After adding traces to a RPI and then run the report it says, the xxxxx_RPI is invalid even though it is not. This gets resolved after few attempts.

Thus, I suggest you to check for invalid objects and re-compile. If the one you were referring is valid, then log in to the application and run the flow.

 

Userlevel 7
Badge +11

This could be due to invalidation of the underline database objects due to some other developments in the database during the time you were debugging the code.
There could be parallel developments in the database on the same database objects you are using and they may invalidate the database objects from time to time. 

Have you checked the invalid objects in the database when you received this issue?
Recompiling the invalid objects before starting the debugging would help.

Hi Jagath,

Thank you for your reply. I also suspected that the database is being used and being changed by someone while I was investigating. And I was investigating on customer’s prod after hours.  However, the customer confirmed that there were no other db operations happening at that moment and I was the only one accessing the prod db. 

Also I recompiled invalids and there were 5 of them and all of them were not relevant to the packages in the picture. Also customer confirmed that those 5 were there for a long time and not due to the investigation. 

Userlevel 7
Badge +11

Hi,

I have faced similar kind of situation when investigations issues related to reports. After adding traces to a RPI and then run the report it says, the xxxxx_RPI is invalid even though it is not. This gets resolved after few attempts.

Thus, I suggest you to check for invalid objects and re-compile. If the one you were referring is valid, then log in to the application and run the flow.

 

Hi Chamika, 

Thank you for your reply. I did check for invalids. But the APIs I was interacting with were valid and compiled without issues. Running with the app was also not an option because I was using Dbms Outputs.

Only thing helped me to proceed was to restart PLSQL and re-running the PLSQL script in the Test Window. Which was very inconvenient doing time to time. 

BR,
Charana