Error during userhook call in HR_ASSIGNMENT_BK2.UPDATE_EMP_ASG_B (Doc ID 2059343.1)

Last updated on DECEMBER 10, 2015

Applies to:

Oracle Self-Service Human Resources - Version 12.1 HRMS RUP8 and later
Information in this document applies to any platform.

Symptoms

On : 12.1 HRMS RUP8 version, Assignment,Term,Pay,ChgMgr,LOA

When attempting to change manager (or any assignment related function) with user hook code call in HR_ASSIGNMENT_BK2.UPDATE_EMP_ASG_B, the following error occurs.

 java.lang.NullPointerException
 at oracle.apps.per.selfservice.supervisor.server.SupervisorAMImpl.updateAssignment(SupervisorAMImpl.java:472)
 at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
 at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
 at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
 at java.lang.reflect.Method.invoke(Method.java:597)
 at oracle.apps.fnd.framework.server.OAUtility.invokeMethod(OAUtility.java:190)
 at oracle.apps.fnd.framework.server.OAApplicationModuleImpl.invokeMethod(OAApplicationModuleImpl.java:722)
 at oracle.apps.per.selfservice.supervisor.webui.SupervisorCO.processFormRequest(SupervisorCO.java:219)
 at oracle.apps.fnd.framework.webui.OAWebBeanHelper.processFormRequest(OAWebBeanHelper.java:827)
 at oracle.apps.fnd.framework.webui.OAWebBeanContainerHelper.processFormRequest(OAWebBeanContainerHelper.java:385)
 at oracle.apps.fnd.framework.webui.beans.layout.OAStackLayoutBean.processFormRequest(OAStackLayoutBean.java:370)



Steps to Reproduce:
The issue can be reproduced at will with the following steps:

1. Add a custom user hook call in HR_ASSIGNMENT_BK2.UPDATE_EMP_ASG_B to display a message based on any logic.

 

  Example:

  CREATE OR REPLACE procedure xx_test_PRC AS
  BEGIN
  hr_utility.set_message (800, ‘HR_Display_MSG’); -- HR_Display_MSG is a message.
  hr_utility.raise_error;
  END xx_test_PRC;
/
 
 Modify HR_ASSIGNMENT_BK2.UPDATE_EMP_ASG_B to call the above procedure:
 
 end if;
 end if;
 
 -- Added code below Begin
 if hr_api.call_app_hooks then
 xx_test_PRC;
 end if ;
 -- Added code below End
 
 hr_api.validate_commit_unit(l_commit_unit_number, 'UPDATE_EMP_ASG', 'BP');
 hr_utility.set_location(' Leaving: HR_ASSIGNMENT_BK2.UPDATE_EMP_ASG_B', 20);
 end UPDATE_EMP_ASG_B;
 end HR_ASSIGNMENT_BK2;
/

 

2. Compile the package body.
 
3. Navigate to 'Manager Self-Service' -> Change Manager

4. Click Action icon for any employee.

5. Click Continue button in the effective date options page.

6. Change the New Direct Report, Click Next button.

7. Shows Error.

8. Remove the user hook call from HR_ASSIGNMENT_BK2.UPDATE_EMP_ASG_B, Re-test no error.



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