java.lang.SecurityException:policy table update SYS:JAVA.朗.运



尝试从系统向我的架构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 

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

grant JAVA_ADMIN to my_user WITH ADMIN OPTION;

相关内容

  • 没有找到相关文章

最新更新