oracle-databaseoracle-apex

Oracle APEX Dynamic Action call to package throwing error "ORA-06550: line 11, column 19: PLS-00302: component 'GET_EMP_INFO' must be declared"


I have a page item with dynamic action (on change). This works (other processes fire). I've added an action to call a procedure in a package to get employee info. When I try to validate, that call in APEX is throwing the error "ORA-06550: line 11, column 19: PLS-00302: component 'GET_EMP_INFO' must be declared".

I can execute the procedure in the package directly (in Toad) and I get the expected output. So I don't think the procedure is the issue.

Here's the APEX dynamic action call (Execute Server-side code > PL/SQL). Can you tell what's causing the error?

DECLARE
    l_job_code varchar(200);
    l_job_title varchar(200);
    l_position_number varchar(200);
    l_position_suffix varchar(200);
    l_org_number varchar(200);
    l_org_name varchar(200);

BEGIN
    --call procedure in package and directly assign output to page items (and some vars)
    hri.pkg_apex_eab.get_emp_info (
        in_ee                               => :P2_EE,
        out_emp_employee_number             => :P2_EE_EMPLOYEE_NUMBER,
        out_emp_full_name                   => :P2_EE_FULL_NAME,
        out_emp_email_address               => :P2_EE_EMAIL_ADDRESS,
        out_emp_user_name                   => :P2_EE_USER_NAME,
        out_emp_job_classification_code     => l_job_code,
        out_emp_job_classification_title    => l_job_title,
        out_emp_position_number             => l_position_number,
        out_emp_position_suffix             => l_position_suffix,
        out_emp_working_title               => l_position_suffix,
        out_emp_org_number                  => l_org_number,
        out_emp_org_name                    => l_org_name,
        out_supv_employee_number            => :P2_EE_SUPV_EID,
        out_supv_full_name                  => :P2_EE_SUPV_FULLNAME,
        out_supv_user_name                  => :P2_EE_SUPV_USERNAME,
        out_supv_email_address              => :P2_EE_SUPV_EMAIL);

        --combine some return vars and assign to page items
        :P2_EE_JOB := l_job_code || '.' || l_job_title;
        :P2_EE_POSITION := l_position_number || '.' || l_position_suffix || '.' || l_working_title;
        :P2_EE_ORG := '[' || l_org_number || '] ' || l_org_name;

        --set session values
        apex_util.set_session_state('P2_EE_EMPLOYEE_NUMBER', out_emp_employee_number);
        apex_util.set_session_state('P2_EE_FULL_NAME', out_emp_full_name);
        apex_util.set_session_state('P2_EE_EMAIL_ADDRESS', out_emp_email_address);
        apex_util.set_session_state('P2_EE_USER_NAME', out_emp_user_name);
        apex_util.set_session_state('P2_EE_JOB', l_job_code || '.' || l_job_title);
        apex_util.set_session_state('P2_EE_POSITION', l_position_number || '.' || l_position_suffix || '.' || l_working_title);
        apex_util.set_session_state('P2_EE_ORG', '[' || l_org_number || '] ' || l_org_name);
        apex_util.set_session_state('P2_EE_SUPV_FULLNAME', out_supv_full_name);
        --apex_util.set_session_state('P2_EE_SUPV_EID', '[' || l_supv_eid || '] ' || l_supv_eid);
        apex_util.set_session_state('P2_EE_SUPV_EMAIL', out_supv_email_address);
        apex_util.set_session_state('P2_EE_SUPV_USERNAME', out_supv_user_name);

END;

I tried calling hri.pkg_apex_eab.get_emp_info from an APEX dynamic action and expected to get several data points back (assigned into other page items). Instead, I got the error "ORA-06550: line 11, column 19: PLS-00302: component 'GET_EMP_INFO' must be declared".


Solution

  • This is how you're calling it:

    hri.pkg_apex_eab.get_emp_info
    

    which means that:

    Questions/suggestions: