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 Go to next message
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
https://www.facebook.com/photo.php?fbid=264322447333370&set=a.157773467988269.1073741828.100012668507980&type=3&theater

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;

Re: HTTP 400 - Bad request Page cannot be found while submitting tabular form [message #660329 is a reply to message #660326] Wed, 15 February 2017 00:48 Go to previous messageGo to next message
Michel Cadot
Messages: 68625
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator

Welcome to the forum.
Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Format your code, i you don't know how to do it, learn it using SQL Formatter.
Also always post your Oracle version, with 4 decimals, as solution depends on it.

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 Go to previous messageGo to next message
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

Re: Bad Request - The HTTP client sent a request that this server could not understand [message #660336 is a reply to message #660333] Wed, 15 February 2017 02:00 Go to previous messageGo to next message
tienthanhpham
Messages: 4
Registered: February 2017
Junior Member
My issue is similar to this:
"Hi,

I have a tabular form with 1,600 rows and 4 columns. The user can select the number of rows to be displayed on the page from a drop down box. When more than 500 rows are displayed and the user tries to delete or update a record, they get the HTTP 400 Bad Request error message. When fewer rows are displayed, say 10, then all is ok and updates are possible. Is there a limit set somewhere that I can change to prevent this error? Why give the option to display 1,600 rows (or more) but then not allow any updates to be made?"

Or this

"Hello,

I created dynamic tabular form using apex_items, that loads table as tabular form which I choosed from select list. So the problem is next: When it returns more than 150 rows I got this error:

Bad Request

The HTTP client sent a request that this server could not understand.

If rows are less its all ok. How could be this problem resolved?

Thank you."
Re: Bad Request - The HTTP client sent a request that this server could not understand [message #660406 is a reply to message #660336] Wed, 15 February 2017 15:22 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
As far as I can tell (based on my own experience), that's the way it is and the only way to fix it is to set number of rows per page to a smaller number (such as 100 instead of 1000).

It appears that you exceeded number of elements that can be processed on a tabular form (at least, that's what Tony Miller says).
Re: Bad Request - The HTTP client sent a request that this server could not understand [message #660408 is a reply to message #660406] Wed, 15 February 2017 19:00 Go to previous messageGo to next message
tienthanhpham
Messages: 4
Registered: February 2017
Junior Member
Littlefoot wrote on Wed, 15 February 2017 15:22
As far as I can tell (based on my own experience), that's the way it is and the only way to fix it is to set number of rows per page to a smaller number (such as 100 instead of 1000).

It appears that you exceeded number of elements that can be processed on a tabular form (at least, that's what Tony Miller says).
Thx for your help. Anyway, the function works well in my Dev Environment with 1000 so I wonder if the firewall might be the problem because there's no firewall in Dev Server at all.
Re: Bad Request - The HTTP client sent a request that this server could not understand [message #660413 is a reply to message #660408] Thu, 16 February 2017 00:14 Go to previous messageGo to next message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
I wouldn't know, sorry. As I have said: when my tabular form refused to work due to large number of rows, once I restricted that number, the form displayed (and worked) properly.
Re: Bad Request - The HTTP client sent a request that this server could not understand [message #681367 is a reply to message #660406] Sun, 12 July 2020 23:34 Go to previous messageGo to next message
Rohit8804
Messages: 1
Registered: July 2020
Location: Pune
Junior Member

HI ,

Could you please assist where we can see this limit.

THanks in Advance
Rohit Bhagat
Re: Bad Request - The HTTP client sent a request that this server could not understand [message #681373 is a reply to message #681367] Mon, 13 July 2020 09:45 Go to previous message
Littlefoot
Messages: 21806
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
In tabular form's Attributes, Layout section, Number of rows property.
Previous Topic: Insert process ORACLE APEX
Next Topic: ORDS OAUTH - How to preserve client (id and secret)
Goto Forum:
  


Current Time: Thu Mar 28 15:14:47 CDT 2024