Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-29268: HTTP client error 406 - Not Acceptable

Becky-ITDec 17 2009 — edited Dec 31 2009
Hi All,

I have a procedure that checks all the URLs in specific database columns to ensure they are correct. Everything works fine unless the URL is an Oracle Portal URL (internal or external) or an Application Express URL (internal). When the program hits these two, I receive the following error:

ORA-29274: HTTP request failed
ORA-06512: at "SYS.UTL_HTTP", line 1231
ORA-29268: HTTP client error 406 - Not Acceptable

Database Version: 10.2.0.4.0
Oracle Portal Version: 10.1.4.2.0 (Build: 197)
Application Express Version: 3.2.0.00.27

We do not use proxies

A sample Oracle Portal url would be:
http://www.msic.dia.mil/portal/page/portal/myportal_page/System_Page?p_type=XXX&p_user=qwerty

A sample Apex URL would be:
http://www.msic.dia.mil/pls/apex/f?p=101:1:1234123412341234::::P0_USER,P0_ID:qwerty,1234

Code snippet:
Declare
v_html VarChar2(2000);
Begin
For i In (Select id, url
From my_table
Loop
v_html := Null;
If i.url Is Not Null Then
v_html := Substr(Utl_Http.Request(Utl_Url.Escape(i.url)),1,100);
End If;
End Loop;
Exception
When request_failed Then
Utl_File.Put_Line(v_out, 'Error: request failed: '||sqlerrm);
When init_failed Then
Utl_File.Put_Line(v_out, 'Error: Init failed: '||sqlerrm);
When Others Then
Utl_File.Put_line(v_out, 'Error: Other: '||sqlerrm);
End;

It is hitting the Other Exception.

Thanks so much in advance!
Becky
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jan 28 2010
Added on Dec 17 2009
8 comments
4,481 views