Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Problem with procedure definition
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 - 07:11:07 CST
![]() |
![]() |