gpt4 book ai didi

oracle12c - java.lang.SecurityException : policy table update SYS:JAVA. LANG.RUNTIMEPERMISSION,GETCLASSLOADER

转载 作者:行者123 更新时间:2023-12-04 17:31:16 35 4
gpt4 key购买 nike

在尝试从 sys 向我的模式 ABC 授予 java 执行权限时,出现以下错误。我尝试了各种版本,但每次出现错误时,请提出任何建议。

我正在使用 Oracle 12c 数据库

    SQL> BEGIN
DBMS_JAVA.GRANT_PERMISSION ('ABC', 'SYS:JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' );
COMMIT;
END; 2 3 4
5 /
BEGIN
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.SecurityException: policy table update
SYS:JAVA.LANG.RUNTIMEPERMISSION, GETCLASSLOADER
ORA-06512: at "SYS.DBMS_JAVA", line 705
ORA-06512: at line 2



SQL> call DBMS_JAVA.GRANT_PERMISSION ('ABC', 'SYS:JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' );
call DBMS_JAVA.GRANT_PERMISSION ('ABC', 'SYS:JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' )
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.SecurityException: policy table update
SYS:JAVA.LANG.RUNTIMEPERMISSION, GETCLASSLOADER


SQL> exec DBMS_JAVA.GRANT_PERMISSION ('ABC', 'SYS:JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' );
BEGIN DBMS_JAVA.GRANT_PERMISSION ('ABC', 'SYS:JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' ); END;

*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.SecurityException: policy table update
SYS:JAVA.LANG.RUNTIMEPERMISSION, GETCLASSLOADER
ORA-06512: at "SYS.DBMS_JAVA", line 705
ORA-06512: at line 1


SQL>


SQL> call DBMS_JAVA.GRANT_PERMISSION ('ABC', 'JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' );
call DBMS_JAVA.GRANT_PERMISSION ('ABC', 'JAVA.LANG.RUNTIMEPERMISSION', 'GETCLASSLOADER', '' )
*
ERROR at line 1:
ORA-29532: Java call terminated by uncaught Java exception:
java.lang.ClassNotFoundException: JAVA/LANG/RUNTIMEPERMISSION

最佳答案

这是我的答案 found ,在尝试授予 java 权限之前运行它:

grant JAVA_ADMIN to my_user WITH ADMIN OPTION;

关于oracle12c - java.lang.SecurityException : policy table update SYS:JAVA. LANG.RUNTIMEPERMISSION,GETCLASSLOADER,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/59455255/

35 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com