473,396 Members | 1,917 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

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

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.

Expand|Select|Wrap|Line Numbers
  1. PROCEDURE p993_GET_Qry_To_avia_weather
  2. IS
  3.     l_http_request   UTL_HTTP.req;
  4.     l_http_response  UTL_HTTP.resp;
  5.     l_buffer_size    NUMBER(10) := 512;
  6.     l_line_size      NUMBER(10) := 70;
  7.     l_lines_count    NUMBER(10) := 10;
  8.     l_string_request VARCHAR2(512);
  9.     l_url            VARCHAR2(512);
  10.     l_line           VARCHAR2(128);
  11.     l_raw_data       RAW(512);
  12.     l_clob_response  CLOB;
  13.  
  14. BEGIN     
  15.     /*
  16.        send HTTP request depending on the html file structure fount at the url : http:/aviationweather.gov/adds/metars/  :
  17.                                                        ...
  18.                    < FORM name="textForm" method="GET" action="">  
  19.                    <INPUT SIZE=14 NAME="station_ids" TYPE="text">
  20.                                         ............
  21.                 <INPUT NAME="submitmet" TYPE="submit" VALUE="Submit">
  22.                  <INPUT TYPE="reset" VALUE="Reset FORM"></FORM>
  23.                                              .......              ...
  24.     */   
  25.     l_url := 'http://aviationweather.gov/adds/metars?station_ids='||:METAR_BLOCK.metars;  
  26.     l_http_request := UTL_HTTP.begin_request(url =>l_url ,method => 'GET');    
  27.     UTL_HTTP.set_header(r => l_http_request, name => 'User-Agent', value => 'IE8');
  28.     UTL_HTTP.set_header(l_http_request, 'Host', 'aviationweather.gov');
  29.  
  30.     l_http_response := UTL_HTTP.get_response(l_http_request);
  31.     DBMS_OUTPUT.put_line('Response> status_code: "' || l_http_response.status_code || '"');
  32.     DBMS_OUTPUT.put_line('Response> reason_phrase: "' ||l_http_response.reason_phrase || '"');
  33.     DBMS_OUTPUT.put_line('Response> http_version: "' ||l_http_response.http_version || '"');
  34.  
  35.        BEGIN  -- response block
  36.  
  37.          <<response_loop>>
  38.              LOOP
  39.                  UTL_HTTP.read_raw(l_http_response, l_raw_data, l_buffer_size);
  40.                  l_clob_response := l_clob_response || UTL_RAW.cast_to_varchar2(l_raw_data);
  41.              END LOOP response_loop;
  42.  
  43.              EXCEPTION
  44.                  WHEN UTL_HTTP.end_of_body THEN
  45.                      UTL_HTTP.end_response(l_http_response);
  46.        END;    -- Response Block
  47.  
  48.     DBMS_OUTPUT.put_line('Response> length: "' || LENGTH(l_clob_response) || '"');
  49.     DBMS_OUTPUT.put_line(CHR(10) || '=== Print first ' || l_lines_count || ' lines of HTTP response... ===' || CHR(10) || CHR(10));
  50.  
  51.           <<print_response>>
  52.            FOR i IN 0..CEIL(LENGTH(l_clob_response) / l_line_size) - 1 LOOP
  53.                l_line := SUBSTR(l_clob_response, i * l_line_size + 1, l_line_size);
  54.                DBMS_OUTPUT.put_line('[' || LPAD(i, 2, '0') || ']: ' || SUBSTR(TRIM(l_line),1,50) || '...');
  55.                EXIT WHEN i > l_lines_count - 1;
  56.            END LOOP print_response;
  57.  
  58.            IF l_http_request.private_hndl IS NOT NULL THEN
  59.                UTL_HTTP.end_request(l_http_request);
  60.            END IF;
  61.  
  62.            IF l_http_response.private_hndl IS NOT NULL THEN
  63.                UTL_HTTP.end_response(l_http_response);
  64.            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.
Feb 6 '14 #1
1 2838
check for grants
please provide grant execute on function ..
Feb 17 '14 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Brian Basquille | last post by:
Hello all, Hope someone can help me with this! It would be much appreciated! Am using a Access 2000 Database (actcs2002.mdb) integrated into VB6. I am having trouble writing a Find command...
2
by: wen | last post by:
and, in which case, the following case will happen: if __name__!='__main__': do_sth() any help would be appreciated.
2
by: MLH | last post by:
An attached table named tblCustomers (but without the capital C) is attached to my Access database. The table is a remote MySQL table. I can read it and even make some changes to its data manually...
2
by: Dr. Zharkov | last post by:
Hello. Inform, please, where to find programs for Visual C++ .NET 2002 or 2003 on building the three-dimensional solid and surface z=f(x, y) in 3D-space (without usage of other libraries such as...
4
by: Charles Collins | last post by:
Is there a way to set the program name for a connection so that it is a bit more descriptive than ".Net SqlClient Data Provider"? Thanks, Charles
7
by: misha | last post by:
Hello. I was wandering if someone could explain to me (or point to some manual) the process of mapping the addresses of host variables by DB2. Especially I would like to know when DB2 decides to...
0
by: nadeekaMIT | last post by:
Dim command As New SqlCommand command.Connection = con command.CommandText = "sp_Customer" command.CommandType = CommandType.StoredProcedure command.Parameters.Add(New...
0
by: Koteswara Rao K | last post by:
HI, How to call Sql * Loader Program Without passing Database user name and PAssword
5
by: lukaxa | last post by:
i have table with two column ID and groups. ID: (1) (2) (3) Groups: (2,12,21) (11,1,31) (43,44,144) i want to find id with group 1, if i use "Like" , i am receiving every ID with...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.