Problem with procedure definition

From: Tom Cat <homer_simpson_at_libero.it>
Date: Thu, 6 Mar 2003 14:14:10 +0100
Message-ID: <_QH9a.1231$Fc.33305_at_tornado.fastwebnet.it>


I'm trying to access Java code directly from Oracle database. 1 - I've written the Hello class containing just a static method world() which returns a String "world"

2 - I've loaded in database using the "loadjava" utilities

3 - I created the HELLOWORLD function in this way: SQL> create or replace function HELLOWORLD return VARCHAR2 as language java name 'Hello.world() return java.lang.String'; /

4 - When i try to create the procedure EXAMPLE_JAVA, I obtain an error ... SQL> create or replace Procedure EXAMPLE_JAVA as begin
variable mystring VARCHAR2[20];
call HELLOWORLD() into :mystring;
print :mystring;
end;
/
warning: procedure created with compilation errors. Oracle enterprise console says (I translate from the italian): Row number: 3 column number: 10 Error: PLS-00103: Found symbol "MYSTRING" instead of one of the following : := .

Thanks in advance for your replies. Received on Thu Mar 06 2003 - 14:14:10 CET

Original text of this message