Skip to Main Content

APEX

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!

UTL_HTTP, different error codes: APEX SQL Commands vs. Oracle SQL Developer

suPPLerMay 19 2011 — edited May 23 2011
Hi, omniscient all!

I have a code sample where I try to request some URL from an inactive server:
declare
  l_text varchar2(32000);
begin
  l_text := utl_http.request('http://inactive.url:7777');
exception
  when others then
    declare
      l_errcode number := utl_http.get_detailed_sqlcode;
    begin
      dbms_output.put_line(l_errcode);
      dbms_output.put_line(sqlerrm(l_errcode));
    end;
end;
/
When I run it in Oracle SQL Developer it shows:
anonymous block completed
-12541
ORA-12541: TNS:no listener
When I run it in the APEX 4.0 SQL Commands window it shows:
-29263
ORA-29263: HTTP protocol error

Statement processed.
The question is: why?

In real world, I need to make a HTTP POST request (no problem) and catch some exceptions. But instead of the usual ORA-12541 error APEX throws an ORA-29261 one.
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2011
Added on May 19 2011
1 comment
222 views