ORA-06508 PL/SQL: could not find program unit being called

25 pts.
Tags:

technical environment : Forms [32 Bit] Version 9.0.2.9.0 (Production), oracle JInitiator: Version
1.3.1.9, WebUtil Version 1.0.2(Beta), window xp service pack 2 build 2600, Internet Explorer 8

I created a form  called read_web_file.fmb

this form has
a- block called METAR_BLOCK under which a   text item called  metar_code with initial values airport code (OLBA, LCLK )    

b- block called Button under which a button PASS_VAUES is created and a procedure p993_GET_Qry_To_avia_weather  has been called


After executing the following  procedure an error is happened:  ORA-06508 PL/SQL: could not find program unit being called.

PROCEDURE p993_GET_Qry_To_avia_weather
IS
    l_http_request   UTL_HTTP.req;
    l_http_response  UTL_HTTP.resp;
    l_buffer_size    NUMBER(10) := 512;
    l_line_size      NUMBER(10) := 70;
    l_lines_count    NUMBER(10) := 10;
    l_string_request VARCHAR2(512);
    l_url            VARCHAR2(512);
    l_line           VARCHAR2(128);
    l_raw_data       RAW(512);
    l_clob_response  CLOB;
 
BEGIN    
    /*
       send HTTP request depending on the html file structure fount at the url : http:/aviationweather.gov/adds/metars/  :
                                                       ...
                   < FORM name="textForm" method="GET" action=""> 
                   <INPUT SIZE=14 NAME="station_ids" TYPE="text">
                                        ............
                <INPUT NAME="submitmet" TYPE="submit" VALUE="Submit">
                 <INPUT TYPE="reset" VALUE="Reset FORM"></FORM>
                                             .......              ...
    */  
    l_url := 'http://aviationweather.gov/adds/metars?station_ids='||:METAR_BLOCK.metars; 
    l_http_request := UTL_HTTP.begin_request(url =>l_url ,method => 'GET');   
    UTL_HTTP.set_header(r => l_http_request, name => 'User-Agent', value => 'IE8');
    UTL_HTTP.set_header(l_http_request, 'Host', 'aviationweather.gov');
   
    l_http_response := UTL_HTTP.get_response(l_http_request);
    DBMS_OUTPUT.put_line('Response> status_code: "' || l_http_response.status_code || '"');
    DBMS_OUTPUT.put_line('Response> reason_phrase: "' ||l_http_response.reason_phrase || '"');
    DBMS_OUTPUT.put_line('Response> http_version: "' ||l_http_response.http_version || '"');
 
       BEGIN  -- response block
   
         <<response_loop>>
             LOOP
                 UTL_HTTP.read_raw(l_http_response, l_raw_data, l_buffer_size);
                 l_clob_response := l_clob_response || UTL_RAW.cast_to_varchar2(l_raw_data);
             END LOOP response_loop;
     
             EXCEPTION
                 WHEN UTL_HTTP.end_of_body THEN
                     UTL_HTTP.end_response(l_http_response);
       END;    -- Response Block
   
    DBMS_OUTPUT.put_line('Response> length: "' || LENGTH(l_clob_response) || '"');
    DBMS_OUTPUT.put_line(CHR(10) || '=== Print first ' || l_lines_count || ' lines of HTTP response... ===' || CHR(10) || CHR(10));
 
          <<print_response>>
           FOR i IN 0..CEIL(LENGTH(l_clob_response) / l_line_size) - 1 LOOP
               l_line := SUBSTR(l_clob_response, i * l_line_size + 1, l_line_size);
               DBMS_OUTPUT.put_line('[' || LPAD(i, 2, '0') || ']: ' || SUBSTR(TRIM(l_line),1,50) || '...');
               EXIT WHEN i > l_lines_count - 1;
           END LOOP print_response;
       
           IF l_http_request.private_hndl IS NOT NULL THEN
               UTL_HTTP.end_request(l_http_request);
           END IF;
       
           IF l_http_response.private_hndl IS NOT NULL THEN
               UTL_HTTP.end_response(l_http_response);
           END IF;
 
I run my form in debug mode when the cursor arrive on the instruction:  l_http_request := UTL_HTTP.begin_request(url =>l_url ,method => 'GET' ) or in any instruction which invoke a procedure or function in the package UTL_HTTP body i  have got the mentioned error .
I would like to clarify that UTL_HTTP  specification is opened and compiled  under the Program Unit  in the object navigator .
 
any one Can help me  how I can using and wrap oracle supplied packages (just as utl_url or utl_http) through  my own stored procedures and call them from my forms??
 
Thank you and i appreciate any support.

Answer Wiki

Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Discuss This Question: 1  Reply

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
  • carlosdl
    "I would like to clarify that UTL_HTTP  specification is opened and compiled  under the Program Unit  in the object navigator"

    Does this mean that UTL_HTTP is a local (part of the form's code) package that is a wrapper for the Oracle's utl_http one?
    70,220 pointsBadges:
    report

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following