Java Error ORA-06512: at "APPS.HR_OBJECTIVE_LIBRARY_SWI" for a custom user hook call in HR_OBJECTIVE_LIBRARY_BK2.UPDATE_LIBRARY_OBJECTIVE_B

(Doc ID 2173403.1)

Last updated on MARCH 08, 2017

Applies to:

Oracle Performance Management - Version 12.1 HRMS RUP8 and later
Information in this document applies to any platform.

Symptoms

 

When attempting to apply Objectives after update (with custom user hook in HR_OBJECTIVE_LIBRARY_BK2.UPDATE_LIBRARY_OBJECTIVE_B),
the following Java error occurs rather then showing actual FND Message as per business need.

ERROR
-----------------------

## Detail 0 ##
java.sql.SQLException: ORA-20001: <Error Message for the User hook>
ORA-06512: at "APPS.HR_OBJECTIVE_LIBRARY_SWI", line 564
ORA-06512: at line 1
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:439)
at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:395)

  

STEPS To Reproduce
-----------------------


The issue can be reproduced at the following steps:

1. Create a New Message using 'Functional Administrator' responsibility -> Core Services -> Messages

2. Create procedure to be called from the user hook when Objective is Updated.
CREATE OR REPLACE procedure xx_test_prc AS
BEGIN
hr_utility.set_message (800, 'HR_XXX_MSG'); -- Where 'HR_XXX_MSG' is a custom message
hr_utility.raise_error;
END xx_test_prc;
/
Show Error;

3. Modify the User Hook to display the Message when the Objective is updated.
Edit HR_OBJECTIVE_LIBRARY_BK2 package body and update procedure UPDATE_LIBRARY_OBJECTIVE_B

....
....
,P_ATTRIBUTE28 in VARCHAR2
,P_ATTRIBUTE29 in VARCHAR2
,P_ATTRIBUTE30 in VARCHAR2
,P_OBJECT_VERSION_NUMBER in NUMBER
)is
begin
hr_utility.set_location('Entering: HR_OBJECTIVE_LIBRARY_BK2.UPDATE_LIBRARY_OBJECTIVE_B', 10);
-- Call Procedure to display message
xx_test_prc;
-- Call Procedure to display message

hr_utility.set_location(' Leaving: HR_OBJECTIVE_LIBRARY_BK2.UPDATE_LIBRARY_OBJECTIVE_B', 20);
end UPDATE_LIBRARY_OBJECTIVE_B;
end HR_OBJECTIVE_LIBRARY_BK2;

Compile the package body. Make sure no error.

4. Navigate to 'US Super HRMS Manager' responsibility


5. Select 'Career Management' submenu


6. Select Objectives Library function


7. Search and select an existing Objective


8. Click on the Update icon to update the Objective Library.


9. Change any value. (Example: Change the Priority to 'Low' or any other value)

10. Click Apply button. Shows Java Error rather then message window


(Expecting to see a popup window to display the message HR_XXX_MSG from the user hook code).

Error Page
You have encountered an unexpected error. Please contact the System Administrator for assistance.
Click here for exception details.

11. Click on here link to see the Java Error Stack.

 

Cause

Sign In with your My Oracle Support account

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

My Oracle Support provides customers with access to over a
Million Knowledge Articles and hundreds of Community platforms