Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2014

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

    technical environment : Forms [32 Bit] Version (Production), oracle JInitiator: Version, 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
    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;

    send HTTP request depending on the html file structure fount at the url : http:/ :
    < 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 := ''||: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', '');

    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

    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;

    WHEN UTL_HTTP.end_of_body THEN
    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));

    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
    END IF;

    IF l_http_response.private_hndl IS NOT NULL THEN
    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.

  2. #2
    Join Date
    Jan 2004
    Croatia, Europe
    Provided Answers: 5
    Ask your DBA to grant you access (that would be GRANT EXECUTE, I presume) to UTL_HTTP package.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts