Intermittent Page Not found 404
Hi Folks, hope someone can assist with this problem we are having. Please bear with me as I'm fairly new to APEX etc.
We are looking to build some apps that effectively report on data from EBS (HR and Payroll) so nothing too clever and this part works really well.
We have some setup notes for integrating APEX with EBS and have followed Rod West's guidance notes on this subject, however, we have found that we are getting a page 404 error occassionally when launching the app from the EBS menu.
I can't understand why the apps will launch sucessfully most times and then get this error. This is even whilst logged in as same user. We are live with these apps as yet and this is something that will delay us in doing so therefore, any suggestions will be of great benefit.
The package body is along the following lines
PROCEDURE l_154 as
v_application NUMBER := 154;
v_page NUMBER := 101;
v_url varchar2(400);
l_valid_session boolean;
BEGIN
l_valid_session := icx_sec.validateSession(c_update => FALSE);
OWA_UTIL.mime_header('text/html', false);
OWA_COOKIE.send (name=>'APEX_APPS_154', value=>FND_GLOBAL.user_name||':'||apex_generate_hash(FND_GLOBAL.user_name)||':'||FND_GLOBAL.RESP_NAME,
path=>'/');
OWA_UTIL.redirect_url( 'http://kirkhrdev.scottishpower.com:8050/pls/apex/f?p='||v_application||':'||v_page||'::'||null||':::'|| null||':'||null);
END;
--Next 2 function for generating password from apps
--used to generate password for apps login
FUNCTION apex_generate_hash (p_string IN VARCHAR2,
p_offset IN NUMBER DEFAULT 0) RETURN VARCHAR2
IS
BEGIN
IF p_string IS NULL THEN RETURN NULL; END IF;
RETURN RAWTOHEX(UTL_RAW.cast_to_raw(
DBMS_OBFUSCATION_TOOLKIT.MD5(input_string=>p_string||':'||
TO_CHAR(SYSDATE-(p_offset/24*60*60),'YYYYMMDD HH24MISS'))));
END apex_generate_hash;
FUNCTION apex_validate_hash (p_string IN VARCHAR2,
p_hash IN VARCHAR2,
p_delay IN NUMBER DEFAULT 5) RETURN BOOLEAN
IS
BEGIN
FOR i IN 0..p_delay LOOP
IF p_hash = apex_generate_hash (p_string, i) THEN RETURN TRUE; END IF;
END LOOP;
RETURN FALSE;
END apex_validate_hash;
FUNCTION custom_ebiz_suite_auth(p_username IN VARCHAR2,
p_password IN VARCHAR2) RETURN boolean AS
BEGIN
IF apps.XXSP_APEX_LAUNCHER.apex_validate_hash (p_username, p_password) THEN
RETURN TRUE;
ELSIF apps.FND_WEB_SEC.validate_login (p_username, p_password) = 'Y' THEN
RETURN TRUE;
ELSE
RETURN FALSE;
END IF;
END custom_ebiz_suite_auth;
end XXSP_apex_launcher;
The cookie that we are using as a before header process is as follows:-
DECLARE
c OWA_COOKIE.cookie;
a wwv_flow_global.vc_arr2;
BEGIN
c := OWA_COOKIE.get('APEX_APPS_150');
a := htmldb_util.string_to_table(c.vals(1));
:P101_USERNAME := a(1);
:P101_PASSWORD := a(2);
:P101_RESP_NAME := a(3);
IF :P101_PASSWORD IS NOT NULL THEN
wwv_flow_custom_auth_std.login(
P_UNAME => :P101_USERNAME,
P_PASSWORD => :P101_PASSWORD,
P_SESSION_ID => v('APP_SESSION'),
P_FLOW_PAGE => :APP_ID||':1'
);
:P101_COOKIE := a(1)||' - '||a(2);
END IF;
EXCEPTION WHEN OTHERS THEN NULL;
END;
Cheers
Scott