0
試圖使Java函數從成員函數中工作。我對此很陌生,所以我不知道錯誤可能在哪裏。將複製所有相關的代碼。Sql開發人員ORA-29531
create or replace
type sfera as object(
radius number(10,2),
member function tilpums(radius double precision) return double precision);
create or replace and compile JAVA source named "Papild" as
public class Papild {
public static double rek(double radius)
{
return 3.14*radius*radius*radius*4/3;
}
}
create or replace
type body sfera as
member function tilpums(radius double precision) return double precision as Language java
Name 'Papild.rek(double) return double';
end;
Create table sferas of sfera;
Insert into sferas values(4);
select value(a).tilpums(radius) from sferas a;
,並從選擇我收到以下錯誤信息:
Error starting at line 1 in command:
select value(a).tilpums(radius) from sferas a
Error report:
SQL Error: ORA-29531: no method rek in class Papild
29531. 00000 - "no method %s in class %s"
*Cause: An attempt was made to execute a non-existent method in a
Java class.
*Action: Adjust the call or create the specified method.
所有幫助將不勝感激。
謝謝,會嘗試這一點。這是我的額外任務,我不清楚我必須遵守的規則。 – user3215354
解決方案已被接受,但我仍然想知道如何在沒有此解決方法的情況下執行此操作。 – user3215354