Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

create stored procedure

Status
Not open for further replies.

doreen80

Programmer
Aug 29, 2003
2
DE
hello everybody!

i have trouble creating a simple java stored procedure.

my java code:
public class Hello
{
public static String world()
{
return "Hello World";
}
}

I compiled it and loaded it in the oracle server using "loadjava"

Now theres the problem:
I cannot create the function

my code:
SQL create or replace function HELLOWORLD return VARCHAR2 as language java name 'Hello.world() return java.lang.String';

error: a comipilation error occured

whats the problem, I don't understand why this simple example doesn't work?

would be nice if someone can help me!

thx,doreen
 
If you're using SQLPlus (don't know if works in other programs) then you can type the "show errors" command after trying to compile the stored procedure which will show the errors it encountered while trying to compile. I've also never tried this with Java, only with PL/SQL.

Hope this helps,
Mike
 
Did you load and resolve it without errors? Do you create pl/sql procedure in the same schema?

Regards, Dima
 
thanks both of us, I solved the problem. The 'loadjava' command didn't work.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top