Home » Developer & Programmer » Application Express, ORDS & MOD_PLSQL » HTTP 400 - Bad request Page cannot be found while submitting tabular form
HTTP 400 - Bad request Page cannot be found while submitting tabular form [message #660326] |
Tue, 14 February 2017 23:26 |
|
tienthanhpham
Messages: 4 Registered: February 2017
|
Junior Member |
|
|
Hi all,
I'm currently working on a Development and a Production environment of Apex 5.0.
I get the error of Http 400 - Bad Request on Production Environment while submitting tabular form.
Everything works fine on Development Environment with Required Number of Rows of the Tabular Form set to 1000
My servers are running on Embedded PL/SQL Gateway. I tried to modify the Max_parameter with the command "dbms_epg.set_global_attribute('max-parameters', '10') on Development Envrironment but even with small value (10 as above) it still works fine so I wonder if it is exactly the cause?
With the Production Enviroment, things are OK if I set Required Number of Rows of the Tabular Form to 100 instead of 1000 as before.
Somebody please help me make it work on Production Environment with the same setting (number of rows of tab form) of Dev one?
;
Here's the screeenshot
My submitting code of the page:
Begin
DELETE FROM HU_TMP_EMP_WORKING_FULL where upper(CREATED_BY) = upper(:APP_USER);
FOR i in 1 .. apex_application.g_f01.count
LOOP
FOR employees IN (
SELECT EMPLOYEE_ID
FROM HU_EMPLOYEES
WHERE ORG_ID = apex_application.g_f02(apex_application.g_f01(i)) and nvl(WORK_STATUS,0) <> 4
--WHERE ORG_ID = apex_application.g_f01(i)
ORDER BY ORG_ID
)
LOOP
BEGIN
--calling store procedure
HU_REPORT_EMP_WORKING_FULL (username => :APP_USER, emp_id => employees.employee_id);
Exception
when others then CONTINUE;
END;
END LOOP;
END LOOP;
End;
HU_REPORT_EMP_WORKING_FULL store procedure:
create or replace PROCEDURE "HU_REPORT_EMP_WORKING_FULL" (username IN VARCHAR2, emp_id IN VARCHAR2)
IS
v_pos_id0 number;
v_pos_id1 number;
v_pos_id2 number;
v_org_id0 number;
v_org_id1 number;
v_org_id2 number;
v_count number := 0;
CURSOR employee_cur
IS
SELECT
"EMPLOYEE_ID",
"CIF",
"VN_FULLNAME",
"GENDER",
"BIRTH_DATE",
"MARITAL_STATUS",
"RELIGION",
"NATIONALITY",
"CUR_ADDRESS",
"PER_ADDRESS",
"ID",
"ID_NO",
"ID_DATE",
"ID_PLACE",
"WORK_STATUS",
"EFFECT_DATE",
"APPLIED_BY",
"BANK",
"BANK_CODE",
"ACCOUNT_NO",
"MOBILE",
"TEL",
"WORK_TEL",
"EMAIL1",
"EMAIL2",
"JOIN_DATE",
"DOITUONG_ID",
"WEND_DATE",
"CONTRACT_TYPE",
"CEND_DATE",
"ACADEMY_LV",
"SPECIALIZE",
"LOCATION",
"POS_ID",
"ORG_ID",
"ORG_ID_TT"
FROM HU_EMPLOYEES
WHERE employee_id = emp_id and nvl(WORK_STATUS,0) <> 4;
v_employee employee_cur%ROWTYPE;
CURSOR working_coex_cur
IS
SELECT distinct pos_id, org_id
FROM hu_working_coex
WHERE employee_id = emp_id and nvl(WORK_STATUS,0) <> 4;
v_working_coex working_coex_cur%ROWTYPE;
BEGIN
OPEN employee_cur;
LOOP
FETCH employee_cur INTO v_employee;
EXIT WHEN employee_cur%NOTFOUND;
OPEN working_coex_cur;
LOOP
FETCH working_coex_cur INTO v_working_coex;
EXIT WHEN working_coex_cur%NOTFOUND;
CASE v_count
WHEN 0 THEN
BEGIN
v_pos_id0 := v_working_coex.pos_id;
v_org_id0 := v_working_coex.org_id;
v_count := v_count + 1;
END;
WHEN 1 THEN
BEGIN
v_pos_id1 := v_working_coex.pos_id;
v_org_id1 := v_working_coex.org_id;
v_count := v_count + 1;
END;
WHEN 2 THEN
BEGIN
v_pos_id2 := v_working_coex.pos_id;
v_org_id2 := v_working_coex.org_id;
v_count := v_count + 1;
END;
END CASE;
END LOOP;
CLOSE working_coex_cur;
INSERT INTO HU_TMP_EMP_WORKING_FULL(EMPLOYEE_ID, CIF,VN_FULLNAME,GENDER,BIRTH_DATE,MARITAL_STATUS,RELIGION,NATIONALITY,CUR_ADDRESS,PER_ADDRESS,ID,ID_NO,ID_DATE,ID_PLACE,WORK_STATUS,E FFECT_DATE,APPLIED_BY,BANK,BANK_CODE,ACCOUNT_NO,MOBILE,TEL,WORK_TEL,EMAIL1,EMAIL2,JOIN_DATE,DOITUONG_ID,WEND_DATE,CONTRACT_TYPE,CEND_ DATE,ACADEMY_LV,SPECIALIZE,LOCATION,pos_id,org_id,org_id_tt,pos_id0,org_id0,pos_id1,org_id1,pos_id2,org_id2,CREATED_BY,CREATED_DATE)
VALUES (v_employee.EMPLOYEE_ID,v_employee.CIF,v_employee.VN_FULLNAME,v_employee.GENDER,v_employee.BIRTH_DATE,v_employee.MARITAL_STATUS,v_emp loyee.RELIGION,v_employee.NATIONALITY,v_employee.CUR_ADDRESS,v_employee.PER_ADDRESS,v_employee.ID,v_employee.ID_NO,v_employee.ID_DATE ,v_employee.ID_PLACE,v_employee.WORK_STATUS,v_employee.EFFECT_DATE,v_employee.APPLIED_BY,v_employee.BANK,v_employee.BANK_CODE,v_emplo yee.ACCOUNT_NO,v_employee.MOBILE,v_employee.TEL,v_employee.WORK_TEL,v_employee.EMAIL1,v_employee.EMAIL2,v_employee.JOIN_DATE,v_employ ee.DOITUONG_ID,v_employee.WEND_DATE,v_employee.CONTRACT_TYPE,v_employee.CEND_DATE,v_employee.ACADEMY_LV,v_employee.SPECIALIZE,v_emplo yee.LOCATION,v_employee.pos_id,v_employee.org_id,v_employee.org_id_tt,v_pos_id0,v_org_id0,v_pos_id1,v_org_id1,v_pos_id2,v_org_id2,use rname,sysdate);
END LOOP;
CLOSE employee_cur;
COMMIT;
END;
|
|
|
|
Bad Request - The HTTP client sent a request that this server could not understand [message #660333 is a reply to message #660329] |
Wed, 15 February 2017 01:25 |
|
tienthanhpham
Messages: 4 Registered: February 2017
|
Junior Member |
|
|
Thx for your instructions.
I'm currently working on a Apex 5.0 and Oracle 11G
"Bad Request - The HTTP client sent a request that this server could not understand" occurs when Tabular Form's number of rows is set to 1000 (instead of 100 e.g that works fine)
please help me!
Here's my code:
BEGIN
DELETE
FROM hu_tmp_emp_working_full
WHERE upper(created_by) = upper(:APP_USER);FOR i IN 1 .. apex_application.g_f01.count
LOOP
FOR employees IN
(
SELECT employee_id
FROM hu_employees
WHERE org_id = apex_application.g_f02(apex_application.g_f01(i))
AND nvl(work_status,0) <> 4
--WHERE ORG_ID = apex_application.g_f01(i)
ORDER BY org_id )
LOOP
BEGIN
--calling store procedure
hu_report_emp_working_full (username => :APP_USER,
emp_id => employees.employee_id);
EXCEPTION
WHEN OTHERS THEN
CONTINUE;
END;
END LOOP;
END LOOP;
END;
--HU_REPORT_EMP_WORKING_FULL store PROCEDURE:
CREATE
OR
replace
PROCEDURE "HU_REPORT_EMP_WORKING_FULL" (username IN VARCHAR2,
emp_id IN VARCHAR2)
IS
v_pos_id0 NUMBER;v_pos_id1 NUMBER;v_pos_id2 NUMBER;v_org_id0 NUMBER;v_org_id1 NUMBER;v_org_id2 NUMBER;v_count NUMBER := 0;CURSOR employee_cur IS
SELECT "EMPLOYEE_ID",
"CIF",
"VN_FULLNAME",
"GENDER",
"BIRTH_DATE",
"MARITAL_STATUS",
"RELIGION",
"NATIONALITY",
"CUR_ADDRESS",
"PER_ADDRESS",
"ID",
"ID_NO",
"ID_DATE",
"ID_PLACE",
"WORK_STATUS",
"EFFECT_DATE",
"APPLIED_BY",
"BANK",
"BANK_CODE",
"ACCOUNT_NO",
"MOBILE",
"TEL",
"WORK_TEL",
"EMAIL1",
"EMAIL2",
"JOIN_DATE",
"DOITUONG_ID",
"WEND_DATE",
"CONTRACT_TYPE",
"CEND_DATE",
"ACADEMY_LV",
"SPECIALIZE",
"LOCATION",
"POS_ID",
"ORG_ID",
"ORG_ID_TT"
FROM hu_employees
WHERE employee_id = emp_id
AND nvl(work_status,0) <> 4;v_employee employee_cur%ROWTYPE;CURSOR working_coex_cur IS
SELECT DISTINCT pos_id,
org_id
FROM hu_working_coex
WHERE employee_id = emp_id
AND nvl(work_status,0) <> 4;v_working_coex working_coex_cur%ROWTYPE;BEGIN
OPEN employee_cur;
LOOP
FETCH employee_cur
INTO v_employee;
EXIT
WHEN employee_cur%NOTFOUND;
OPEN working_coex_cur;
LOOP
FETCH working_coex_cur
INTO v_working_coex;
EXIT
WHEN working_coex_cur%NOTFOUND;
CASE v_count
WHEN 0 THEN
BEGIN
v_pos_id0 := v_working_coex.pos_id;
v_org_id0 := v_working_coex.org_id;
v_count := v_count + 1;
END;
WHEN 1 THEN
BEGIN
v_pos_id1 := v_working_coex.pos_id;
v_org_id1 := v_working_coex.org_id;
v_count := v_count + 1;
END;
WHEN 2 THEN
BEGIN
v_pos_id2 := v_working_coex.pos_id;
v_org_id2 := v_working_coex.org_id;
v_count := v_count + 1;
END;
END CASE;
END LOOP;
CLOSE working_coex_cur;
INSERT INTO hu_tmp_emp_working_full
(
employee_id,
cif,
vn_fullname,
gender,
birth_date,
marital_status,
religion,
nationality,
cur_address,
per_address,
id,
id_no,
id_date,
id_place,
work_status,
e ffect_date,
applied_by,
bank,
bank_code,
account_no,
mobile,
tel,
work_tel,
email1,
email2,
join_date,
doituong_id,
wend_date,
contract_type,
cend_ DATE,
academy_lv,
specialize,
location,
pos_id,
org_id,
org_id_tt,
pos_id0,
org_id0,
pos_id1,
org_id1,
pos_id2,
org_id2,
created_by,
created_date
)
VALUES
(
v_employee.employee_id,
v_employee.cif,
v_employee.vn_fullname,
v_employee.gender,
v_employee.birth_date,
v_employee.marital_status,
v_emp loyee.religion,
v_employee.nationality,
v_employee.cur_address,
v_employee.per_address,
v_employee.id,
v_employee.id_no,
v_employee.id_date ,
v_employee.id_place,
v_employee.work_status,
v_employee.effect_date,
v_employee.applied_by,
v_employee.bank,
v_employee.bank_code,
v_emplo yee.account_no,
v_employee.mobile,
v_employee.tel,
v_employee.work_tel,
v_employee.email1,
v_employee.email2,
v_employee.join_date,
v_employ ee.doituong_id,
v_employee.wend_date,
v_employee.contract_type,
v_employee.cend_date,
v_employee.academy_lv,
v_employee.specialize,
v_emplo yee.location,
v_employee.pos_id,
v_employee.org_id,
v_employee.org_id_tt,
v_pos_id0,
v_org_id0,
v_pos_id1,
v_org_id1,
v_pos_id2,
v_org_id2,
username,
SYSDATE
);
END LOOP;
CLOSE employee_cur;
COMMIT;
END;
[Updated on: Wed, 15 February 2017 01:36] Report message to a moderator
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Wed Dec 11 14:09:03 CST 2024
|